diff --git a/tests/critical/conftest.py b/tests/critical/conftest.py index b4f0d34..66c9380 100644 --- a/tests/critical/conftest.py +++ b/tests/critical/conftest.py @@ -1,11 +1,11 @@ """Pytest configuration for critical path tests. -Override autouse fixtures that aren't needed for FileBackend/MemcachedBackend tests. +Override autouse fixtures that aren't needed for non-Redis backend tests. """ def pytest_runtest_setup(item): - """Skip redis setup for file backend and cachekitio metrics tests.""" + """Skip redis setup for non-Redis backend critical tests.""" skip_redis = ( "file_backend" in item.nodeid or "cachekitio_metrics" in item.nodeid diff --git a/tests/critical/test_file_backend_critical.py b/tests/critical/test_file_backend_critical.py index 56d3cdc..9d78915 100644 --- a/tests/critical/test_file_backend_critical.py +++ b/tests/critical/test_file_backend_critical.py @@ -19,7 +19,7 @@ @pytest.fixture -def backend(tmp_path, monkeypatch): +def backend(tmp_path): """Create FileBackend instance for testing. Uses tmp_path fixture to isolate cache directory per test. diff --git a/tests/unit/backends/test_cachekitio_config.py b/tests/unit/backends/test_cachekitio_config.py index fda6e68..d20a6d2 100644 --- a/tests/unit/backends/test_cachekitio_config.py +++ b/tests/unit/backends/test_cachekitio_config.py @@ -9,6 +9,8 @@ is_private_ip, ) +pytestmark = pytest.mark.unit + class TestIsPrivateIP: """Tests for is_private_ip function.""" diff --git a/tests/unit/backends/test_cachekitio_error_handler.py b/tests/unit/backends/test_cachekitio_error_handler.py index b0041f3..1111126 100644 --- a/tests/unit/backends/test_cachekitio_error_handler.py +++ b/tests/unit/backends/test_cachekitio_error_handler.py @@ -6,6 +6,8 @@ from cachekit.backends.cachekitio.error_handler import classify_http_error from cachekit.backends.errors import BackendError, BackendErrorType +pytestmark = pytest.mark.unit + def _response(status_code: int) -> httpx.Response: return httpx.Response(status_code=status_code, request=httpx.Request("GET", "http://test")) diff --git a/tests/unit/backends/test_file_config.py b/tests/unit/backends/test_file_config.py index 26e6d88..83983e1 100644 --- a/tests/unit/backends/test_file_config.py +++ b/tests/unit/backends/test_file_config.py @@ -16,6 +16,8 @@ from cachekit.backends.file.config import FileBackendConfig +pytestmark = pytest.mark.unit + class TestFileBackendConfigDefaults: """Test default configuration values."""