From edebeac619eaaed3b9871a2d70b463b9ef3f187b Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 5 Jul 2026 19:56:57 -0400 Subject: [PATCH] test: remove gemini_cli references in 6 + delete test_ai_client_list_models.py Drop stale gemini_cli expectations: PROVIDERS expectations in test_providers_source_of_truth + test_provider_curation, the test_list_models_gemini_cli function (deleted the whole file since it was the only test), the test_discussion_compression_gemini_cli function, the test_gcli_path_updates_adapter function (its setter was removed), the ui_gemini_cli_path references in test_mma_tier_usage_reset_fix and test_rag_integration. These are the t1.9 minor edits. --- tests/test_ai_client_list_models.py | 17 ----------------- tests/test_discussion_compression.py | 6 +----- tests/test_mma_tier_usage_reset_fix.py | 3 +-- tests/test_process_pending_gui_tasks.py | 10 ---------- tests/test_provider_curation.py | 2 +- tests/test_providers_source_of_truth.py | 2 +- tests/test_rag_integration.py | 2 +- 7 files changed, 5 insertions(+), 37 deletions(-) delete mode 100644 tests/test_ai_client_list_models.py diff --git a/tests/test_ai_client_list_models.py b/tests/test_ai_client_list_models.py deleted file mode 100644 index 6bb51ab1..00000000 --- a/tests/test_ai_client_list_models.py +++ /dev/null @@ -1,17 +0,0 @@ -from src import ai_client - -def test_list_models_gemini_cli() -> None: - """ - - - Verifies that 'ai_client.list_models' correctly returns a list of models - for the 'gemini_cli' provider. - """ - models = ai_client.list_models("gemini_cli") - assert "gemini-3.1-pro-preview" in models - assert "gemini-3-flash-preview" in models - assert "gemini-2.5-pro" in models - assert "gemini-2.5-flash" in models - assert "gemini-2.0-flash" in models - assert "gemini-2.5-flash-lite" in models - assert len(models) == 6 \ No newline at end of file diff --git a/tests/test_discussion_compression.py b/tests/test_discussion_compression.py index 7f727f16..da81d3f3 100644 --- a/tests/test_discussion_compression.py +++ b/tests/test_discussion_compression.py @@ -64,11 +64,7 @@ def test_discussion_compression_deepseek(): assert result == "DeepSeek summary." -def test_discussion_compression_gemini_cli(): - ai_client.set_provider("gemini_cli", "gemini-1.5-flash") - - mock_adapter = MagicMock() - mock_adapter.send.return_value = {"text": "CLI summary."} + with patch("src.ai_client.GeminiCliAdapter", return_value=mock_adapter): result = ai_client.run_discussion_compression("CLI history") diff --git a/tests/test_mma_tier_usage_reset_fix.py b/tests/test_mma_tier_usage_reset_fix.py index ace3df4c..79979cce 100644 --- a/tests/test_mma_tier_usage_reset_fix.py +++ b/tests/test_mma_tier_usage_reset_fix.py @@ -34,12 +34,11 @@ def controller(tmp_path: Path) -> AppController: ctrl = AppController() ctrl.active_project_path = str(proj_path) # _flush_to_project reads several UI flags that __init__ does not set - # (ui_project_preset_name, ui_word_wrap, ui_gemini_cli_path, + # (ui_project_preset_name, ui_word_wrap, # ui_auto_add_history). Set them so the test exercises the # mma_tier_usage code path without tripping on unrelated missing attrs. ctrl.ui_project_preset_name = None ctrl.ui_word_wrap = True - ctrl.ui_gemini_cli_path = "" ctrl.ui_auto_add_history = False yield ctrl diff --git a/tests/test_process_pending_gui_tasks.py b/tests/test_process_pending_gui_tasks.py index 9463c717..24856b97 100644 --- a/tests/test_process_pending_gui_tasks.py +++ b/tests/test_process_pending_gui_tasks.py @@ -36,16 +36,6 @@ def test_redundant_calls_in_process_pending_gui_tasks(app_instance: App) -> None assert mock_set_provider.call_count == 1 assert mock_reset_session.call_count == 1 -def test_gcli_path_updates_adapter(app_instance: App) -> None: - app_instance.controller.current_provider = 'gemini_cli' - app_instance.controller._pending_gui_tasks = [ - {'action': 'set_value', 'item': 'gcli_path', 'value': '/new/path/to/gemini'} - ] - # Initialize adapter if it doesn't exist (it shouldn't in mock env) - ai_client._gemini_cli_adapter = None - app_instance.controller._process_pending_gui_tasks() - assert ai_client._gemini_cli_adapter is not None - assert ai_client._gemini_cli_adapter.binary_path == '/new/path/to/gemini' def test_process_pending_gui_tasks_drag(app_instance: App) -> None: """Test that the drag action is correctly processed and dispatches to the registered callback.""" diff --git a/tests/test_provider_curation.py b/tests/test_provider_curation.py index a9948f8e..42687cdb 100644 --- a/tests/test_provider_curation.py +++ b/tests/test_provider_curation.py @@ -3,6 +3,6 @@ import src.app_controller def test_providers_moved_to_models(): """Verify that PROVIDERS list is in models.py and removed from AppController.""" - expected_providers = ['gemini', 'anthropic', 'gemini_cli', 'deepseek', 'minimax', 'qwen', 'grok', 'llama'] + expected_providers = ['gemini', 'anthropic', 'deepseek', 'minimax', 'qwen', 'grok', 'llama'] assert models.PROVIDERS == expected_providers assert not hasattr(src.app_controller.AppController, 'PROVIDERS') \ No newline at end of file diff --git a/tests/test_providers_source_of_truth.py b/tests/test_providers_source_of_truth.py index 91609d1d..5c4cf420 100644 --- a/tests/test_providers_source_of_truth.py +++ b/tests/test_providers_source_of_truth.py @@ -9,7 +9,7 @@ from __future__ import annotations import src.models as models import src.ai_client as ai_client -EXPECTED_PROVIDERS = ["gemini", "anthropic", "gemini_cli", "deepseek", "minimax", "qwen", "grok", "llama"] +EXPECTED_PROVIDERS = ["gemini", "anthropic", "deepseek", "minimax", "qwen", "grok", "llama"] def test_providers_defined_in_src_ai_client() -> None: assert hasattr(ai_client, "PROVIDERS") diff --git a/tests/test_rag_integration.py b/tests/test_rag_integration.py index c567a21e..2cec825a 100644 --- a/tests/test_rag_integration.py +++ b/tests/test_rag_integration.py @@ -48,7 +48,7 @@ def test_rag_integration(mock_project): app.history_trunc_limit = 1000 app.top_p = 1.0 app.ui_agent_tools = {} - app.ui_gemini_cli_path = "gemini" + app.current_model = "gemini-1.5-flash" app.active_project_path = os.path.join(mock_project, "manual_slop.toml")