From 272efba5b91551a7ce623094b064e2ba7c0ab1ab Mon Sep 17 00:00:00 2001 From: Chester Curme Date: Wed, 21 May 2025 09:27:16 -0400 Subject: [PATCH] explicitly enable test --- .../anthropic/tests/integration_tests/test_standard.py | 4 ++++ .../integration_tests/chat_models/test_azure_standard.py | 8 ++++++++ .../integration_tests/chat_models/test_base_standard.py | 4 ++++ .../langchain_tests/integration_tests/chat_models.py | 1 + .../langchain_tests/unit_tests/chat_models.py | 4 ++++ 5 files changed, 21 insertions(+) diff --git a/libs/partners/anthropic/tests/integration_tests/test_standard.py b/libs/partners/anthropic/tests/integration_tests/test_standard.py index b216141d261..f8c6823bb2d 100644 --- a/libs/partners/anthropic/tests/integration_tests/test_standard.py +++ b/libs/partners/anthropic/tests/integration_tests/test_standard.py @@ -41,6 +41,10 @@ class TestAnthropicStandard(ChatModelIntegrationTests): def supports_anthropic_inputs(self) -> bool: return True + @property + def enable_vcr_tests(self) -> bool: + return True + @property def supported_usage_metadata_details( self, diff --git a/libs/partners/openai/tests/integration_tests/chat_models/test_azure_standard.py b/libs/partners/openai/tests/integration_tests/chat_models/test_azure_standard.py index 41e6aec4bd5..6c7756f1a39 100644 --- a/libs/partners/openai/tests/integration_tests/chat_models/test_azure_standard.py +++ b/libs/partners/openai/tests/integration_tests/chat_models/test_azure_standard.py @@ -38,6 +38,10 @@ class TestAzureOpenAIStandard(ChatModelIntegrationTests): def supports_json_mode(self) -> bool: return True + @property + def enable_vcr_tests(self) -> bool: + return True + class TestAzureOpenAIStandardLegacy(ChatModelIntegrationTests): """Test a legacy model.""" @@ -58,3 +62,7 @@ class TestAzureOpenAIStandardLegacy(ChatModelIntegrationTests): @property def structured_output_kwargs(self) -> dict: return {"method": "function_calling"} + + @property + def enable_vcr_tests(self) -> bool: + return True diff --git a/libs/partners/openai/tests/integration_tests/chat_models/test_base_standard.py b/libs/partners/openai/tests/integration_tests/chat_models/test_base_standard.py index 31f2cc70a92..abc0a666a84 100644 --- a/libs/partners/openai/tests/integration_tests/chat_models/test_base_standard.py +++ b/libs/partners/openai/tests/integration_tests/chat_models/test_base_standard.py @@ -57,6 +57,10 @@ class TestOpenAIStandard(ChatModelIntegrationTests): ]: return {"invoke": ["reasoning_output", "cache_read_input"], "stream": []} + @property + def enable_vcr_tests(self) -> bool: + return True + def invoke_with_cache_read_input(self, *, stream: bool = False) -> AIMessage: with open(REPO_ROOT_DIR / "README.md") as f: readme = f.read() diff --git a/libs/standard-tests/langchain_tests/integration_tests/chat_models.py b/libs/standard-tests/langchain_tests/integration_tests/chat_models.py index a1592d6dccf..63ca82ad3ac 100644 --- a/libs/standard-tests/langchain_tests/integration_tests/chat_models.py +++ b/libs/standard-tests/langchain_tests/integration_tests/chat_models.py @@ -2681,6 +2681,7 @@ class ChatModelIntegrationTests(ChatModelTests): ) assert isinstance(response, AIMessage) + @pytest.mark.benchmark def test_stream_time( self, model: BaseChatModel, benchmark: BenchmarkFixture, vcr: vcr.VCR ) -> None: diff --git a/libs/standard-tests/langchain_tests/unit_tests/chat_models.py b/libs/standard-tests/langchain_tests/unit_tests/chat_models.py index 70a0316c9f3..445879d2919 100644 --- a/libs/standard-tests/langchain_tests/unit_tests/chat_models.py +++ b/libs/standard-tests/langchain_tests/unit_tests/chat_models.py @@ -201,6 +201,10 @@ class ChatModelTests(BaseStandardTests): content.""" return False + @property + def enable_vcr_tests(self) -> bool: + return False + @property def supported_usage_metadata_details( self,