Skip to content

Commit

Permalink
Use pyproject.toml for coverage settings (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex authored Mar 19, 2024
1 parent 29829f7 commit b88150b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 35 deletions.
34 changes: 0 additions & 34 deletions .coveragerc

This file was deleted.

18 changes: 18 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,21 @@ skip-magic-trailing-comma = true
[tool.ruff.lint.isort]
combine-as-imports = true
split-on-trailing-comma = false

[tool.coverage.run]
branch = false
omit = ["tests/*"]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"def __str__",
"def __repr__",
"if 0:",
"if False:",
"if __name__ == .__main__.:",
"if self\\.config\\['DEBUG'\\]:",
"if self\\.debug:",
"except ImportError:",
]
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ deps=
pytest-timeout
PyYAML
commands=
pytest --cov-report term-missing --cov-config .coveragerc --cov multipart --timeout=30 tests
pytest --cov-report term-missing --cov-config pyproject.toml --cov multipart --timeout=30 tests

0 comments on commit b88150b

Please sign in to comment.