Add pytest-cov for test coverage
- Add pytest-cov as dev dependency - Configure coverage in pyproject.toml - Exclude tests, __pycache__, seed.py from coverage - Enable branch coverage - Add .coverage to gitignore
This commit is contained in:
parent
6c218130e9
commit
6a2d7155cb
2 changed files with 14 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ dev = [
|
|||
"aiosqlite>=0.20.0",
|
||||
"mypy>=1.13.0",
|
||||
"ruff>=0.14.10",
|
||||
"pytest-cov>=7.0.0",
|
||||
]
|
||||
|
||||
[tool.mypy]
|
||||
|
|
@ -55,3 +56,15 @@ quote-style = "double"
|
|||
[tool.ruff.lint.per-file-ignores]
|
||||
"tests/*" = ["E501"] # Allow longer lines in tests for readability
|
||||
|
||||
[tool.coverage.run]
|
||||
source = ["."]
|
||||
omit = ["tests/*", "__pycache__/*", "seed.py"]
|
||||
branch = true
|
||||
|
||||
[tool.coverage.report]
|
||||
exclude_lines = [
|
||||
"pragma: no cover",
|
||||
"if TYPE_CHECKING:",
|
||||
]
|
||||
show_missing = true
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue