Skip to content
Open
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
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.PHONY: bump-version bump-version-dry lint typecheck sync precommit test build help
.PHONY: install test-concise docs-serve docs-build docs-deploy
.PHONY: install test-concise test-unit test-integration docs-serve docs-build docs-deploy

# Default target - show help
.DEFAULT_GOAL := help
Expand All @@ -13,6 +13,8 @@ help:
@echo " make lint - Run linters (Python + Markdown)"
@echo " make typecheck - Run type checking"
@echo " make test - Run all tests (verbose)"
@echo " make test-unit - Run unit tests only (no Docker)"
@echo " make test-integration - Run integration tests only (requires Docker)"
@echo " make test-concise - Run all tests (concise output for AI agents)"
@echo " make build - Build package"
@echo " make precommit - Run pre-commit checks (lint + typecheck)"
Expand Down Expand Up @@ -60,6 +62,16 @@ test:
@echo "Running tests..."
@uv run pytest tests -vv

# Unit tests only (no Docker required)
test-unit:
@echo "Running unit tests..."
@uv run pytest tests -vv -m "not integration"

# Integration tests only (requires Docker)
test-integration:
@echo "Running integration tests..."
@uv run pytest tests -vv -m "integration"

# Concise test output for AI agents
test-concise:
@echo "Running tests (concise output)..."
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ addopts = [
]
markers = [
"skip_on_ci: Skip running the test when running on CI",
"integration: Tests that require Docker infrastructure",
]
timeout = 10
timeout_func_only = true
Expand Down
5 changes: 4 additions & 1 deletion tests/stores/aerospike/test_aerospike.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
if TYPE_CHECKING:
from key_value.aio.stores.aerospike import AerospikeStore

pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="Aerospike is not supported on Windows")
pytestmark = [
pytest.mark.integration,
pytest.mark.skipif(sys.platform == "win32", reason="Aerospike is not supported on Windows"),
]

# Aerospike test configuration
AEROSPIKE_NAMESPACE = "test"
Expand Down
2 changes: 2 additions & 0 deletions tests/stores/dynamodb/test_dynamodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from tests.conftest import should_skip_docker_tests
from tests.stores.base import BaseStoreTests, ContextManagerStoreTestMixin

pytestmark = pytest.mark.integration

# DynamoDB test configuration
DYNAMODB_TEST_TABLE = "kv-store-test"

Expand Down
2 changes: 2 additions & 0 deletions tests/stores/elasticsearch/test_elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
from tests.conftest import should_skip_docker_tests
from tests.stores.base import BaseStoreTests, ContextManagerStoreTestMixin

pytestmark = pytest.mark.integration

if TYPE_CHECKING:
from elastic_transport._response import ObjectApiResponse

Expand Down
2 changes: 2 additions & 0 deletions tests/stores/firestore/test_firestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
from tests.conftest import should_skip_docker_tests
from tests.stores.base import BaseStoreTests, ContextManagerStoreTestMixin

pytestmark = pytest.mark.integration

warnings.filterwarnings(
"ignore",
message=r"You are using a Python version .* google\.api_core",
Expand Down
2 changes: 2 additions & 0 deletions tests/stores/memcached/test_memcached.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
from tests.conftest import should_skip_docker_tests
from tests.stores.base import BaseStoreTests, ContextManagerStoreTestMixin

pytestmark = pytest.mark.integration

# Memcached test configuration
MEMCACHED_CONTAINER_PORT = 11211

Expand Down
2 changes: 2 additions & 0 deletions tests/stores/mongodb/test_mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
from tests.conftest import should_skip_docker_tests
from tests.stores.base import BaseStoreTests, ContextManagerStoreTestMixin

pytestmark = pytest.mark.integration

# MongoDB test configuration
MONGODB_TEST_DB = "kv-store-adapter-tests"

Expand Down
2 changes: 2 additions & 0 deletions tests/stores/opensearch/test_opensearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
from tests.conftest import should_skip_docker_tests
from tests.stores.base import BaseStoreTests, ContextManagerStoreTestMixin

pytestmark = pytest.mark.integration

TEST_SIZE_LIMIT = 1 * 1024 * 1024 # 1MB

OPENSEARCH_CONTAINER_PORT = 9200
Expand Down
2 changes: 2 additions & 0 deletions tests/stores/postgresql/test_postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from tests.conftest import should_skip_docker_tests
from tests.stores.base import BaseStoreTests, ContextManagerStoreTestMixin

pytestmark = pytest.mark.integration

try:
import asyncpg
except ImportError:
Expand Down
2 changes: 2 additions & 0 deletions tests/stores/redis/test_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from tests.conftest import should_skip_docker_tests
from tests.stores.base import BaseStoreTests, ContextManagerStoreTestMixin

pytestmark = pytest.mark.integration

# Redis test configuration
REDIS_DB = 15 # Use a separate database for tests

Expand Down
2 changes: 2 additions & 0 deletions tests/stores/s3/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
from tests.conftest import should_skip_docker_tests
from tests.stores.base import BaseStoreTests, ContextManagerStoreTestMixin

pytestmark = pytest.mark.integration

# S3 test configuration (using LocalStack)
S3_TEST_BUCKET = "kv-store-test"

Expand Down
2 changes: 2 additions & 0 deletions tests/stores/valkey/test_valkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
ContextManagerStoreTestMixin,
)

pytestmark = pytest.mark.integration

# Valkey test configuration
VALKEY_DB = 15
VALKEY_CONTAINER_PORT = 6379
Expand Down
2 changes: 2 additions & 0 deletions tests/stores/vault/test_vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
BaseStoreTests,
)

pytestmark = pytest.mark.integration

# Vault test configuration
VAULT_TOKEN = "dev-root-token"
VAULT_MOUNT_POINT = "secret"
Expand Down