Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit be33a49

Browse files
committed
Merge pull request #143 from asottile/improve_coverage
Improve coverage
2 parents cb3aa0d + 7ee3d69 commit be33a49

File tree

5 files changed

+168
-182
lines changed

5 files changed

+168
-182
lines changed

.coveragerc

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,30 @@
1+
[run]
2+
parallel = True
3+
branch = True
4+
source = $PWD
5+
data_file = $PWD/.coverage
6+
omit =
7+
.tox/*
8+
/usr/*
9+
*/tmp*
10+
*/setup.py
11+
*/upload_appveyor_builds.py
12+
113
[report]
14+
show_missing = True
215
exclude_lines =
3-
pragma: no cover
4-
def __repr__
5-
raise TypeError
6-
except UnicodeEncodeError
7-
except KeyboardInterrupt
8-
if __name__ == .__main__.:
16+
# Have to re-enable the standard pragma
17+
\#\s*pragma: no cover
18+
19+
# Don't complain if tests don't hit defensive assertion code:
20+
^\s*raise AssertionError\b
21+
^\s*raise NotImplementedError\b
22+
^\s*return NotImplemented\b
23+
^\s*raise TypeError\b
24+
^\s*raise$
25+
26+
# Don't complain if non-runnable code isn't run:
27+
^if __name__ == ['"]__main__['"]:$
28+
29+
[html]
30+
directory = coverage-html

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ python:
1010
install:
1111
- pip install -rrequirements-dev.txt coveralls
1212
script:
13-
- coverage run --source sass,sassc,sassutils -m pytest sasstests.py
13+
- COVERAGE_PROCESS_START=$PWD/.coveragerc py.test sasstests.py
14+
- coverage combine
15+
- coverage report
1416
- flake8 .
1517
after_success:
1618
- coveralls

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
-e .
22
coverage
3+
coverage-enable-subprocess
34
flake8>=2.4.0
45
pytest
56
werkzeug>=0.9

0 commit comments

Comments
 (0)