|
|
@@ -18,8 +18,39 @@ dev = [
|
|
|
"mypy>=1.19.1",
|
|
|
"pylint>=4.0.5",
|
|
|
"pytest>=9.0.2",
|
|
|
+ "pytest-cov>=7.1.0",
|
|
|
]
|
|
|
|
|
|
+[tool.pytest.ini_options]
|
|
|
+pythonpath = [ "src/" ]
|
|
|
+addopts = [ "--cov" ]
|
|
|
+
|
|
|
+[tool.coverage.run]
|
|
|
+branch = true
|
|
|
+source = [ "src/" ]
|
|
|
+
|
|
|
+[tool.coverage.report]
|
|
|
+exclude_also = [
|
|
|
+ # Don't complain about missing debug-only code:
|
|
|
+ "def __repr__",
|
|
|
+ "if self.debug:",
|
|
|
+ "if settings.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__.:",
|
|
|
+ "if TYPE_CHECKING:",
|
|
|
+ "class .*\\bProtocol\\):",
|
|
|
+ # Don't complain about abstract methods, they aren't run:
|
|
|
+ "@(abc\\.)?abstractmethod",
|
|
|
+]
|
|
|
+
|
|
|
+fail_under = 90.0
|
|
|
+show_missing = true
|
|
|
+skip_covered = true
|
|
|
+
|
|
|
[tool.mypy]
|
|
|
mypy_path = "src/"
|
|
|
exclude = "build/"
|