Skip to content

Commit

Permalink
Extend coverage config
Browse files Browse the repository at this point in the history
  • Loading branch information
yalef committed Dec 1, 2023
1 parent b9896d3 commit 9859768
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ repos:
- id: tests
name: run tests
entry:
inv python.run
" -m coverage run --source import_export_extensions
--omit import_export_extensions/migrations -m pytest -v"
inv python.run " -m coverage run -m pytest -v"
language: system
pass_filenames: false
types: [ python ]
Expand Down
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,26 @@ python_files = [
"test_*.py",
"*_tests.py",
]

[tool.coverage.run]
source = [
"import_export_extensions",
]
omit = [
"import_export_extensions/migrations",
"tasks.py"
]

[tool.coverage.report]
exclude_also = [
"def __repr__",
"def __str__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]

0 comments on commit 9859768

Please sign in to comment.