make a .coveragerc, move config there, some no cover declarations / exclude some code
This commit is contained in:
parent
c53bef5cdb
commit
6f98bdb8b6
30
.coveragerc
Normal file
30
.coveragerc
Normal file
@ -0,0 +1,30 @@
|
||||
# .coveragerc to control coverage.py
|
||||
|
||||
[run]
|
||||
branch = True
|
||||
source = nsupdate
|
||||
omit =
|
||||
*/migrations/*
|
||||
*/_tests/*
|
||||
nsupdate/wsgi.py
|
||||
|
||||
[report]
|
||||
# Regexes for lines to exclude from consideration
|
||||
exclude_lines =
|
||||
# Have to re-enable the standard pragma
|
||||
pragma: no cover
|
||||
|
||||
# Don't complain about missing debug-only code:
|
||||
def __repr__
|
||||
if self\.debug
|
||||
|
||||
# Don't complain if tests don't hit defensive assertion code:
|
||||
raise AssertionError
|
||||
raise NotImplementedError
|
||||
|
||||
# Don't complain if non-runnable code isn't run:
|
||||
if 0:
|
||||
if __name__ == .__main__.:
|
||||
|
||||
ignore_errors = True
|
||||
|
@ -6,9 +6,8 @@ install:
|
||||
- "pip install --upgrade --use-mirrors -e ."
|
||||
- "pip install coveralls"
|
||||
env: SECRET_KEY=justfortravis
|
||||
script: "coverage run --source nsupdate --omit '*/migrations/*,*/_tests/*' -m py.test --pep8"
|
||||
script: "coverage run -m py.test --pep8"
|
||||
after_success:
|
||||
- coveralls debug
|
||||
- coveralls
|
||||
notifications:
|
||||
email:
|
||||
|
@ -5,7 +5,7 @@ nsupdate - dynamic DNS service
|
||||
import re
|
||||
|
||||
|
||||
class Version(tuple):
|
||||
class Version(tuple): # pragma: no cover
|
||||
"""
|
||||
Version objects store versions like 1.2.3a4 in a structured
|
||||
way and support version comparisons and direct version component access.
|
||||
|
Loading…
x
Reference in New Issue
Block a user