Skip to content

Commit 6ff7491

Browse files
committed
Improve test coverage
1 parent cb3aa0d commit 6ff7491

File tree

5 files changed

+170
-178
lines changed

5 files changed

+170
-178
lines changed

.coveragerc

+28-6
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

+3-1
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

+1
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)