Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/critical/conftest.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/critical/test_file_backend_critical.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/backends/test_cachekitio_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
is_private_ip,
)

pytestmark = pytest.mark.unit


class TestIsPrivateIP:
"""Tests for is_private_ip function."""
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/backends/test_cachekitio_error_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/backends/test_file_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

from cachekit.backends.file.config import FileBackendConfig

pytestmark = pytest.mark.unit


class TestFileBackendConfigDefaults:
"""Test default configuration values."""
Expand Down
Loading