From 67ab6279800570d46fa5445ffcd4ed44a81e7f75 Mon Sep 17 00:00:00 2001 From: yusyus Date: Wed, 12 Nov 2025 23:20:19 +0300 Subject: [PATCH] fix: Update terminal detection tests for headless mode default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The terminal detection tests were failing because they expected the old terminal mode behavior, but headless mode is now the default. Fix: - Add headless=False parameter to all terminal detection tests - Tests now explicitly test interactive (terminal) mode - test_subprocess_popen_called_with_correct_args: Tests terminal launch - test_terminal_launch_error_handling: Tests error handling - test_output_message_unknown_terminal: Tests warning messages These tests only run on macOS (they're skipped on Linux) and test the interactive terminal launch functionality, so they need headless=False. Impact: - All 3 failing macOS tests should now pass - 391 tests passing on Linux - CI should pass on macOS now 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tests/test_terminal_detection.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_terminal_detection.py b/tests/test_terminal_detection.py index e07787e..690ed7f 100644 --- a/tests/test_terminal_detection.py +++ b/tests/test_terminal_detection.py @@ -164,9 +164,9 @@ class TestDetectTerminalApp(unittest.TestCase): # Mock Popen to prevent actual terminal launch mock_popen.return_value = MagicMock() - # Run enhancer + # Run enhancer in interactive mode (not headless) enhancer = LocalSkillEnhancer(skill_dir) - result = enhancer.run() + result = enhancer.run(headless=False) # Verify Popen was called self.assertTrue(mock_popen.called) @@ -239,7 +239,8 @@ class TestDetectTerminalApp(unittest.TestCase): old_stdout = sys.stdout sys.stdout = captured_output - result = enhancer.run() + # Run in interactive mode (not headless) to test terminal launch + result = enhancer.run(headless=False) # Restore stdout sys.stdout = old_stdout @@ -279,7 +280,8 @@ class TestDetectTerminalApp(unittest.TestCase): # Mock Popen to prevent actual launch with patch('subprocess.Popen') as mock_popen: mock_popen.return_value = MagicMock() - enhancer.run() + # Run in interactive mode (not headless) to test terminal detection + enhancer.run(headless=False) # Restore stdout sys.stdout = old_stdout