diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2014-05-18 14:00:46 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-05-18 14:00:46 -0400 |
commit | b140c5b4c2e815ac91bd3bb207768c0a28faa80b (patch) | |
tree | 4553bb30a1f22634f58abdc118ca2a876ce68952 /tests/test_summary.py | |
parent | 147c3562631c64066a2da964522a66fb369841c4 (diff) | |
download | python-coveragepy-b140c5b4c2e815ac91bd3bb207768c0a28faa80b.tar.gz |
A test that the report command can use wildcards
Diffstat (limited to 'tests/test_summary.py')
-rw-r--r-- | tests/test_summary.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_summary.py b/tests/test_summary.py index 29167bf..2b655ff 100644 --- a/tests/test_summary.py +++ b/tests/test_summary.py @@ -72,6 +72,22 @@ class SummaryTest(CoverageTest): self.assertIn("mycode ", report) self.assertEqual(self.last_line_squeezed(report), "mycode 4 0 100%") + def test_report_wildcard(self): + # Try reporting using wildcards to get the modules. + self.run_command("coverage run mycode.py") + report = self.report_from_command("coverage report my*.py") + + # Name Stmts Miss Cover + # ---------------------------- + # mycode 4 0 100% + + self.assertEqual(self.line_count(report), 3) + self.assertNotIn("/coverage/", report) + self.assertNotIn("/tests/modules/covmod1 ", report) + self.assertNotIn("/tests/zipmods.zip/covmodzip1 ", report) + self.assertIn("mycode ", report) + self.assertEqual(self.last_line_squeezed(report), "mycode 4 0 100%") + def test_report_omitting(self): # Try reporting while omitting some modules prefix = os.path.split(__file__)[0] |