diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2014-06-02 20:46:40 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-06-02 20:46:40 -0400 |
commit | 43fa1eef17b4e8dd3fd0976110ef287970d2d7da (patch) | |
tree | c066de5dc59e7052ccc556bf7d29981a125c4b28 | |
parent | a38286c663af6bba730c5e05c3d32b764e949440 (diff) | |
download | python-coveragepy-git-43fa1eef17b4e8dd3fd0976110ef287970d2d7da.tar.gz |
Restore the intent of this test
-rw-r--r-- | tests/test_summary.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/test_summary.py b/tests/test_summary.py index 2ceaffd9..2612fe36 100644 --- a/tests/test_summary.py +++ b/tests/test_summary.py @@ -152,21 +152,27 @@ class SummaryTest(CoverageTest): return x if y: print("y") + try: + print("z") + 1/0 + print("Never!") + except ZeroDivisionError: + pass return x missing(0, 1) """) out = self.run_command("coverage run mymissing.py") - self.assertEqual(out, 'y\n') + self.assertEqual(out, 'y\nz\n') report = self.report_from_command("coverage report --show-missing") # Name Stmts Miss Cover Missing # ----------------------------------------- - # mymissing 8 2 75% 3-4 + # mymissing 14 3 79% 3-4, 10 self.assertEqual(self.line_count(report), 3) self.assertIn("mymissing ", report) self.assertEqual(self.last_line_squeezed(report), - "mymissing 8 2 75% 3-4") + "mymissing 14 3 79% 3-4, 10") def test_report_show_missing_branches(self): self.make_file("mybranch.py", """\ |