feat: pytest-cov configuration and test audit cleanup
Add full pytest-cov configuration with fail_under=60% threshold, HTML/XML report targets, and proper exclude_lines. Fix websocket history test to use public broadcast() API instead of manually manipulating internals. Audit confirmed 491 tests at 71.2% coverage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -83,4 +83,27 @@ addopts = "-v --tb=short"
|
||||
|
||||
[tool.coverage.run]
|
||||
source = ["src"]
|
||||
omit = ["*/tests/*"]
|
||||
omit = [
|
||||
"*/tests/*",
|
||||
"src/dashboard/routes/mobile_test.py",
|
||||
]
|
||||
|
||||
[tool.coverage.report]
|
||||
show_missing = true
|
||||
skip_empty = true
|
||||
precision = 1
|
||||
exclude_lines = [
|
||||
"pragma: no cover",
|
||||
"if __name__ == .__main__.",
|
||||
"if TYPE_CHECKING:",
|
||||
"raise NotImplementedError",
|
||||
"@abstractmethod",
|
||||
]
|
||||
# Fail CI if coverage drops below this threshold
|
||||
fail_under = 60
|
||||
|
||||
[tool.coverage.html]
|
||||
directory = "htmlcov"
|
||||
|
||||
[tool.coverage.xml]
|
||||
output = "coverage.xml"
|
||||
|
||||
Reference in New Issue
Block a user