🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
76 lines
1.5 KiB
INI
76 lines
1.5 KiB
INI
[pytest]
|
|
# Pytest configuration for Dangerous Pi
|
|
|
|
# Test discovery patterns
|
|
python_files = test_*.py
|
|
python_classes = Test*
|
|
python_functions = test_*
|
|
|
|
# Test paths
|
|
testpaths = tests
|
|
|
|
# Output options
|
|
addopts =
|
|
# Verbose output
|
|
-v
|
|
# Show local variables in tracebacks
|
|
-l
|
|
# Show summary of all test outcomes
|
|
-ra
|
|
# Enable strict markers
|
|
--strict-markers
|
|
# Coverage reporting
|
|
--cov=app/backend/services
|
|
--cov=app/backend/api
|
|
--cov-report=term-missing
|
|
--cov-report=html:htmlcov
|
|
--cov-report=xml
|
|
# Fail on warnings
|
|
# --strict-warnings
|
|
# Show slowest tests
|
|
--durations=10
|
|
|
|
# Markers
|
|
markers =
|
|
asyncio: marks tests as async (using pytest-asyncio)
|
|
unit: marks tests as unit tests
|
|
integration: marks tests as integration tests
|
|
slow: marks tests as slow running
|
|
skip_ci: skip tests in CI environment
|
|
|
|
# Asyncio configuration
|
|
asyncio_mode = auto
|
|
|
|
# Logging
|
|
log_cli = false
|
|
log_cli_level = INFO
|
|
log_file = tests/test.log
|
|
log_file_level = DEBUG
|
|
|
|
# Coverage options
|
|
[coverage:run]
|
|
source = app/backend
|
|
omit =
|
|
*/tests/*
|
|
*/conftest.py
|
|
*/__pycache__/*
|
|
*/migrations/*
|
|
|
|
[coverage:report]
|
|
# Fail if coverage below threshold
|
|
# fail_under = 80
|
|
exclude_lines =
|
|
# Standard pragmas
|
|
pragma: no cover
|
|
# Defensive programming
|
|
raise AssertionError
|
|
raise NotImplementedError
|
|
# Type checking
|
|
if TYPE_CHECKING:
|
|
# Abstract methods
|
|
@abstractmethod
|
|
# Debug code
|
|
def __repr__
|
|
# Skip main blocks
|
|
if __name__ == .__main__.:
|