fix: Update terminal detection tests for headless mode default
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user