From 6a6991f48c60efca9fec0f67bf0f114a7e5f45fd Mon Sep 17 00:00:00 2001 From: Lina Tawfik Date: Thu, 3 Jul 2025 14:56:56 -0700 Subject: [PATCH] fix: resolve linting issues and simplify tests - Remove trailing whitespace from test files - Consolidate strict_mcp_config test into test_default_options - Keep only the essential transport test for CLI flag verification --- tests/test_transport.py | 4 ++-- tests/test_types.py | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/tests/test_transport.py b/tests/test_transport.py index c2322d8..e8898e4 100644 --- a/tests/test_transport.py +++ b/tests/test_transport.py @@ -143,13 +143,13 @@ class TestSubprocessCLITransport: cmd = transport._build_command() assert "--strict-mcp-config" in cmd - + # Test that flag is not present when False transport_no_strict = SubprocessCLITransport( prompt="test", options=ClaudeCodeOptions(strict_mcp_config=False), cli_path="/usr/bin/claude", ) - + cmd_no_strict = transport_no_strict._build_command() assert "--strict-mcp-config" not in cmd_no_strict diff --git a/tests/test_types.py b/tests/test_types.py index 794266c..2d6b268 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -69,6 +69,7 @@ class TestOptions: assert options.permission_mode is None assert options.continue_conversation is False assert options.disallowed_tools == [] + assert options.strict_mcp_config is False def test_claude_code_options_with_tools(self): """Test Options with built-in tools.""" @@ -105,12 +106,3 @@ class TestOptions: ) assert options.model == "claude-3-5-sonnet-20241022" assert options.permission_prompt_tool_name == "CustomTool" - - def test_claude_code_options_with_strict_mcp_config(self): - """Test Options with strict MCP config.""" - options = ClaudeCodeOptions(strict_mcp_config=True) - assert options.strict_mcp_config is True - - # Test default value - default_options = ClaudeCodeOptions() - assert default_options.strict_mcp_config is False