pytest.iniā¢1.22 kB
[tool:pytest]
# Test discovery
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
# Coverage options
addopts =
--cov=src/database
--cov-report=html:htmlcov
--cov-report=term-missing
--cov-report=xml:coverage.xml
--cov-fail-under=90
--strict-markers
--strict-config
--tb=short
-v
# Minimum coverage required
cov-fail-under = 90
# Markers for test categorization
markers =
unit: Unit tests (fast, isolated)
integration: Integration tests (slower, may require external services)
slow: Slow tests (database, network, etc.)
database: Database-related tests
models: Model tests
utils: Utility function tests
migrations: Migration tests
config: Configuration tests
engine: Database engine tests
async: Async tests
# Async test configuration
asyncio_mode = auto
# Test timeout (in seconds)
timeout = 300
# Filter warnings
filterwarnings =
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
ignore:.*unclosed.*:ResourceWarning
ignore:.*coroutine.*was never awaited:RuntimeWarning
# Test environment variables
env =
ENVIRONMENT = test
DB_DEBUG = true
TESTING = true