summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2015-01-25 09:24:49 -0500
committerJohn Szakmeister <john@szakmeister.net>2015-01-25 09:24:49 -0500
commit87a10ecb09dc454cd1357aae255614ef7fa2b2cf (patch)
tree34423eb97f050cdacc58cb5d3c41cde7c3dadcfb
parentd9b92adc1e5a40b10bda5bc3e86abc5bebde2bcf (diff)
downloadnose-87a10ecb09dc454cd1357aae255614ef7fa2b2cf.tar.gz
Update a coverage plugin test to work with coverage 4.0.
The new coverage appears to provide some more information about the uncovered lines than previous versions.
-rw-r--r--functional_tests/test_coverage_plugin.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/functional_tests/test_coverage_plugin.py b/functional_tests/test_coverage_plugin.py
index 23dd8c3..eb465e8 100644
--- a/functional_tests/test_coverage_plugin.py
+++ b/functional_tests/test_coverage_plugin.py
@@ -40,7 +40,12 @@ class TestCoveragePlugin(PluginTester, unittest.TestCase):
super(TestCoveragePlugin, self).setUp()
def runTest(self):
- self.assertTrue("blah 4 3 25% 1" in self.output)
+ print(self.output)
+ self.assertTrue(
+ # Coverage < 4.0
+ ("blah 4 3 25% 1" in self.output) or
+ # Coverage >= 4.0
+ ("blah.py 4 3 25% 1, 5-6" in self.output))
self.assertTrue("Ran 1 test in" in self.output)
# Assert coverage html report exists
self.assertTrue(os.path.exists(os.path.join(self.cover_html_dir,