80 lines
No EOL
1.7 KiB
INI
80 lines
No EOL
1.7 KiB
INI
[tool:pytest]
|
|
# Pytest configuration file
|
|
|
|
# Test discovery
|
|
testpaths = tests
|
|
python_files = test_*.py *_test.py
|
|
python_classes = Test*
|
|
python_functions = test_*
|
|
|
|
# Markers for different test types
|
|
markers =
|
|
unit: Unit tests (fast, isolated)
|
|
integration: Integration tests (slower, multiple components)
|
|
performance: Performance benchmarks (may take longer)
|
|
slow: Slow tests that may be skipped in CI
|
|
network: Tests requiring network access
|
|
database: Tests requiring database access
|
|
redis: Tests requiring Redis access
|
|
|
|
# Output options
|
|
addopts =
|
|
--strict-markers
|
|
--strict-config
|
|
--verbose
|
|
--tb=short
|
|
--durations=10
|
|
--color=yes
|
|
--cov=detector_worker
|
|
--cov-report=term-missing
|
|
--cov-report=html:htmlcov
|
|
--cov-report=xml:coverage.xml
|
|
--cov-fail-under=80
|
|
--junitxml=test-results.xml
|
|
|
|
# Coverage configuration
|
|
[coverage:run]
|
|
source = detector_worker
|
|
omit =
|
|
*/tests/*
|
|
*/test_*
|
|
*/__pycache__/*
|
|
*/venv/*
|
|
*/env/*
|
|
*/build/*
|
|
*/dist/*
|
|
setup.py
|
|
conftest.py
|
|
|
|
[coverage:report]
|
|
# Regexes for lines to exclude from consideration
|
|
exclude_lines =
|
|
# Have to re-enable the standard pragma
|
|
pragma: no cover
|
|
|
|
# Don't complain about missing debug-only code:
|
|
def __repr__
|
|
if self\.debug
|
|
|
|
# Don't complain if tests don't hit defensive assertion code:
|
|
raise AssertionError
|
|
raise NotImplementedError
|
|
|
|
# Don't complain if non-runnable code isn't run:
|
|
if 0:
|
|
if __name__ == .__main__.:
|
|
|
|
# Don't complain about abstract methods
|
|
@abstractmethod
|
|
|
|
# Report precision
|
|
precision = 2
|
|
show_missing = True
|
|
skip_covered = False
|
|
|
|
[coverage:html]
|
|
directory = htmlcov
|
|
title = Detector Worker Test Coverage Report
|
|
|
|
[coverage:xml]
|
|
output = coverage.xml |