From e40b122b1bc5559051f4c09b40162b0fa603acda Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 15 Jun 2026 18:53:02 -0400 Subject: [PATCH] test(ai_client): delete obsolete test_deprecation_warnings.py (Phase 6.2) Per plan Task 6.3: both tests in test_deprecation_warnings.py are obsolete after the send() function was removed in Phase 6.1: - test_send_deprecated_warning_emitted_once_per_site: literally cannot run without ai_client.send (AttributeError) - test_send_result_does_not_emit_deprecation: trivially true after send() is removed (no deprecation source) The test_send_result_does_not_emit_deprecation regression test is preserved in tests/test_ai_client_result.py (added in Phase 2.7 as the renamed test). The pre-Phase-2.7 test_send_deprecated_emits_warning was deleted in Phase 2.7. Verification: pytest tests/test_deprecation_warnings.py reports 'ERROR: file or directory not found'. --- tests/test_deprecation_warnings.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 tests/test_deprecation_warnings.py diff --git a/tests/test_deprecation_warnings.py b/tests/test_deprecation_warnings.py deleted file mode 100644 index dceb58c4..00000000 --- a/tests/test_deprecation_warnings.py +++ /dev/null @@ -1,25 +0,0 @@ -import warnings -from unittest.mock import patch -from src import ai_client -from src.result_types import Result - - -def test_send_deprecated_warning_emitted_once_per_site() -> None: - with patch.object(ai_client, "set_provider"): - with patch.object(ai_client, "_send_gemini", return_value=Result(data="x")): - with warnings.catch_warnings(record=True) as w: - warnings.simplefilter("always") - ai_client.send("s", "u") - ai_client.send("s", "u") - deprecation_warnings = [x for x in w if issubclass(x.category, DeprecationWarning)] - assert len(deprecation_warnings) >= 1 - - -def test_send_result_does_not_emit_deprecation() -> None: - with patch.object(ai_client, "set_provider"): - with patch.object(ai_client, "_send_gemini", return_value=Result(data="x")): - with warnings.catch_warnings(record=True) as w: - warnings.simplefilter("always") - ai_client.send_result("s", "u") - deprecation_warnings = [x for x in w if issubclass(x.category, DeprecationWarning)] - assert len(deprecation_warnings) == 0