Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# .coveragerc to control coverage.py
[coverage:run]
branch = True
omit =
# no config, tests, samples, data or bin directory and related files
tests/*
samples/*
thirdparty/*
etc/*
*/data/*
*/bin/*
*/templates/*

[coverage:report]
# lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Debug-only code:
def __repr__
if TRACE
logger

# Some assertion code:
raise AssertionError
raise NotImplementedError

# main code does not run in our context:
if __name__ == .__main__.:
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
pip-log.txt

# Unit test / coverage reports
coverage.xml
.coverage
.coverage.*
nosetests.xml
Expand Down
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ python:
# Use a global PYTEST variable to run all of the tests in a uniform fashion
env:
global:
- PYTEST="bin/py.test -n 2 -vvs"
- PYTEST="bin/py.test -n 2 -vvs --cov=src --cov-report=term --cov-report=xml -n2"

matrix:
- TEST_SUITE="$PYTEST"
Expand Down Expand Up @@ -48,6 +48,10 @@ install:
script:
- $TEST_SUITE

after_success:
- ./bin/codecov


notifications:
irc:
channels:
Expand Down
12 changes: 12 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
coverage:
range: 60..95
round: down
precision: 2

ignore:
- "samples/**/*"
- "thirdparty/**/*"
- "etc/**/*"
- "**/data/**/*"
- "**/bin/**/*"
- "*/templates/**/*"