"""conftest for client tests.""" import pytest from ai_eval_runner.clients import jobs, llm @pytest.fixture(autouse=True) def _clear_cached_aws_clients() -> None: # _bedrock_client/_dynamodb_resource are lru_cache'd in production to avoid rebuilding # a boto3 client on every call. Clear before each test so a test's mocked # boto3.client/resource is what actually gets cached, not a previous test's. llm._bedrock_client.cache_clear() jobs._dynamodb_resource.cache_clear()