Skip to content

Commit b88150b

Browse files
authored
Use pyproject.toml for coverage settings (#132)
1 parent 29829f7 commit b88150b

File tree

3 files changed

+19
-35
lines changed

3 files changed

+19
-35
lines changed

.coveragerc

Lines changed: 0 additions & 34 deletions
This file was deleted.

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,21 @@ skip-magic-trailing-comma = true
8484
[tool.ruff.lint.isort]
8585
combine-as-imports = true
8686
split-on-trailing-comma = false
87+
88+
[tool.coverage.run]
89+
branch = false
90+
omit = ["tests/*"]
91+
92+
[tool.coverage.report]
93+
exclude_lines = [
94+
"pragma: no cover",
95+
"raise NotImplementedError",
96+
"def __str__",
97+
"def __repr__",
98+
"if 0:",
99+
"if False:",
100+
"if __name__ == .__main__.:",
101+
"if self\\.config\\['DEBUG'\\]:",
102+
"if self\\.debug:",
103+
"except ImportError:",
104+
]

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ deps=
88
pytest-timeout
99
PyYAML
1010
commands=
11-
pytest --cov-report term-missing --cov-config .coveragerc --cov multipart --timeout=30 tests
11+
pytest --cov-report term-missing --cov-config pyproject.toml --cov multipart --timeout=30 tests

0 commit comments

Comments
 (0)