Skip to content

Commit 27c39e6

Browse files
committed
create .coveragerc config
1 parent e4d4f87 commit 27c39e6

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.coveragerc

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# .coveragerc to control coverage.py
2+
[run]
3+
branch = True
4+
omit =
5+
tests/*
6+
examples/*
7+
docs/*
8+
# omit anything in a .local directory anywhere
9+
# */.local/*
10+
# omit everything in /usr
11+
# /usr/*
12+
# omit this single file
13+
# utils/tirefire.py
14+
15+
[report]
16+
# Regexes for lines to exclude from consideration
17+
exclude_also =
18+
# Don't complain about missing debug-only code:
19+
def __repr__
20+
if self\.debug
21+
22+
# Don't complain if tests don't hit defensive assertion code:
23+
raise AssertionError
24+
raise NotImplementedError
25+
26+
# Don't complain if non-runnable code isn't run:
27+
if 0:
28+
if __name__ == .__main__.:
29+
30+
# Don't complain about abstract methods, they aren't run:
31+
@(abc\.)?abstractmethod
32+
33+
ignore_errors = True
34+
35+
[html]
36+
directory = coverage_html_report

0 commit comments

Comments
 (0)