summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2011-03-21 17:58:09 -0400
committerNed Batchelder <ned@nedbatchelder.com>2011-03-21 17:58:09 -0400
commit27028b408fa4f8ac0ba2da3a3031935ed40fe699 (patch)
treecd63e4c25b6dd5dada1d8414b01d61885be85378 /test
parent36f5be230e1d09cb08ffbfc96643607311e709e0 (diff)
downloadpython-coveragepy-27028b408fa4f8ac0ba2da3a3031935ed40fe699.tar.gz
A narrower way to check that empty __init__.py files show zero statements.
Diffstat (limited to 'test')
-rw-r--r--test/test_summary.py18
1 files changed, 4 insertions, 14 deletions
diff --git a/test/test_summary.py b/test/test_summary.py
index 6711dec..b4b9938 100644
--- a/test/test_summary.py
+++ b/test/test_summary.py
@@ -1,6 +1,6 @@
"""Test text-based summary reporting for coverage.py"""
-import os, re, sys, textwrap
+import os, re, sys
import coverage
from coverage.backward import StringIO
@@ -152,16 +152,6 @@ class SummaryTest2(CoverageTest):
cov.report(file=repout, show_missing=False)
report = repout.getvalue().replace('\\', '/')
- self.assertMultiLineEqual(report, textwrap.dedent("""\
- Name Stmts Miss Cover
- ------------------------------------------------
- test/modules/pkg1/__init__ 1 0 100%
- test/modules/pkg1/p1a 3 0 100%
- test/modules/pkg1/p1b 3 0 100%
- test/modules/pkg2/__init__ 0 0 100%
- test/modules/pkg2/p2a 3 0 100%
- test/modules/pkg2/p2b 3 0 100%
- test/modules/usepkgs 2 0 100%
- ------------------------------------------------
- TOTAL 15 0 100%
- """))
+ report = re.sub(r"\s+", " ", report)
+ self.assert_("test/modules/pkg1/__init__ 1 0 100%" in report)
+ self.assert_("test/modules/pkg2/__init__ 0 0 100%" in report)