Permalink
Browse files

add a proper coveragerc, etc.

  • Loading branch information...
wearpants committed Nov 2, 2010
1 parent 5578cdd commit 68b81c28f9fd30c1f4228a545f9a8da25dad66a1
Showing with 34 additions and 4 deletions.
  1. +24 −0 .coveragerc
  2. +3 −3 scripts/cover-twiggy-tests.sh
  3. +6 −0 sitecustomize.py
  4. +1 −1 twiggy/message.py
@@ -0,0 +1,24 @@
# .coveragerc to control coverage.py
[run]
branch = True
parallel = True
include = twiggy/*

[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:

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
assert False.*

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

ignore_errors = True
@@ -1,6 +1,6 @@
#!/bin/bash
coverage erase
coverage run -a --branch --include="twiggy/*" `which unit2` discover
coverage run -a --branch --include="twiggy/*" `which sphinx-build` -b doctest -d doc/_build/doctrees doc doc/_build/doctest
coverage report -m
COVERAGE_PROCESS_START=.coveragerc coverage run `which unit2` discover
coverage combine
coverage html

@@ -0,0 +1,6 @@
try:
import coverage
coverage.process_startup()
except:
pass

@@ -88,7 +88,7 @@ def __init__(self, level, format_spec, fields, options,
raise ValueError("can't use args with $ style format specs")
s = Template(format_spec).substitute(kwargs)
else:
assert False, "impossible style" # pragma: no cover
assert False, "impossible style"

self.text = s

0 comments on commit 68b81c2

Please sign in to comment.