Skip to content

Commit d854133

Browse files
committed
Add coverage config
1 parent 1fdaa54 commit d854133

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.coveragerc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[run]
2+
include =
3+
splitio/*.py
4+
omit =
5+
tests/*
6+
*/__init__.py
7+
branch = true
8+
9+
[report]
10+
# Regexes for lines to exclude from consideration
11+
exclude_lines =
12+
# Have to re-enable the standard pragma
13+
pragma: no cover
14+
15+
# Don't complain about missing debug-only code:
16+
def __repr__
17+
if self\.debug
18+
19+
# Don't complain if tests don't hit defensive assertion code:
20+
raise AssertionError
21+
raise NotImplementedError
22+
23+
# Don't complain if non-runnable code isn't run:
24+
if 0:
25+
if __name__ == .__main__.:
26+
27+
precision = 2
28+
29+
[xml]
30+
directory = coverage.xml

sonar-project.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ sonar.sources=splitio
55
sonar.tests=tests
66
sonar.text.excluded.file.suffixes=.csv
77
sonar.python.coverage.reportPaths=coverage.xml
8+
sonar.coverage.exclusions=**/__init__.py
89
sonar.links.ci=https://github.com/splitio/python-client
910
sonar.links.scm=https://github.com/splitio/python-client/actions

0 commit comments

Comments
 (0)