Add pytest & coverage settings

This commit is contained in:
ItsDrike 2024-06-30 22:35:14 +02:00
parent 4720ec7c10
commit 5a167c358e
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0

View file

@ -148,3 +148,35 @@ reportUnnecessaryContains = "error"
reportUnnecessaryTypeIgnoreComment = "error"
reportImplicitOverride = "error"
reportShadowedImports = "error"
[tool.pytest.ini_options]
minversion = "6.0"
asyncio_mode = "auto"
testpaths = ["tests"]
addopts = "--strict-markers --cov --no-cov-on-fail"
[tool.coverage.report]
precision = 2
fail_under = 20
show_missing = true
skip_covered = false
skip_empty = false
sort = "cover"
exclude_lines = [
"\\#\\s*pragma: no cover",
"^\\s*if (typing\\.)?TYPE_CHECKING:",
"^\\s*@(abc\\.)?abstractmethod",
"^\\s*@(typing\\.)?overload",
"^\\s*def __repr__\\(",
"^\\s*class .*\\bProtocol\\):",
"^\\s*raise NotImplementedError",
"^\\s*return NotImplemented",
"^\\s*\\.\\.\\.",
]
[tool.coverage.run]
relative_files = true
parallel = true
branch = true
timid = false
source = ["src"]