test: fix external editor test to use real temp file that exists

This commit is contained in:
2026-05-07 21:21:05 -04:00
parent 6a615a2d20
commit a6c569fb69
3 changed files with 37 additions and 33 deletions
+3 -7
View File
@@ -115,12 +115,8 @@
"hash": "9b034a4193a0d9031521d4c761b458170ef8feecba3220918543d4b768199ae2",
"summary": "This module manages the state and callbacks for a patch approval modal. It handles requesting patch approval, storing pending patch details, and triggering actions upon patch application or rejection.\n\n* **State Management:** Tracks whether a modal is shown and holds details of a pending patch.\n* **Callback Handling:** Allows setting and invoking callbacks for patch application and rejection.\n* **Singleton Pattern:** Provides a global, single instance of the `PatchModalManager`.\n\n**Outline:**\n**Python** \u2014 73 lines\nimports: dataclasses, time, typing\nclass PendingPatch\nclass PatchModalManager: __init__, request_patch_approval, get_pending_patch, is_modal_shown, set_apply_callback, set_reject_callback, apply_patch, reject_patch, close_modal, reset\nfunctions: get_patch_modal_manager, reset_patch_modal_manager"
},
"C:\\Users\\Ed\\AppData\\Local\\Temp\\pytest-of-Ed\\pytest-864\\test_auto_aggregate_skip0\\file1.txt": {
"hash": "d0b425e00e15a0d36b9b361f02bab63563aed6cb4665083905386c55d5b679fa",
"summary": "This document contains a single line of text, \"content1\". Its purpose and key takeaways are limited to this singular piece of content.\n\n**Outline:**\n**TXT** \u2014 1 lines\npreview:\n```\ncontent1\n```"
},
"C:\\Users\\Ed\\AppData\\Local\\Temp\\pytest-of-Ed\\pytest-864\\test_force_full0\\other.txt": {
"hash": "04d61c0832f9cbc2a210334352425d2519890a0a5945da96ccc5bd9ff101c4d3",
"summary": "This document is a simple text file containing ten lines of content, with the first eight lines previewed. Its purpose appears to be for basic data storage or as a placeholder.\n\n**Outline:**\n**TXT** \u2014 10 lines\npreview:\n```\nline1\nline2\nline3\nline4\nline5\nline6\nline7\nline8\n```"
"C:\\projects\\manual_slop\\tests\\test_external_editor_gui.py": {
"hash": "a0aca43b13763c7ba0490a140ddef2c5d1e899839f593cb99e33461501e5d618",
"summary": "This file contains integration tests for the external editor functionality of the GUI. It verifies that the GUI correctly launches external editors like VS Code with appropriate arguments and handles user interactions related to the external editor feature.\n\n* **External Editor Launch Verification:** Tests ensure that configured external editors (specifically VS Code) are launched with the correct command-line arguments for diff views.\n* **Configuration Loading:** Tests validate that the GUI correctly reads and applies external editor configurations from `config.toml`.\n* **GUI Interaction Testing:** Simulates user interactions like clicking buttons within the patch modal to trigger external editor actions.\n* **Command Format Validation:** Independently verifies the format of commands generated for launching external editors.\n\n**Outline:**\n**Python** \u2014 418 lines\nimports: os, pathlib, pytest, src, subprocess, sys, tempfile, time, tomli_w, tomllib\nfunctions: get_vscode_processes, vscode_external_editor_config, setup_external_editor_in_workspace, test_vscode_launches_with_diff_view, test_verify_command_format, get_vscode_processes, test_external_editor_config, test_patch_modal_shows_with_configured_editor, test_button_click_is_received, test_verify_vscode_command_format"
}
}