From 43fa1eef17b4e8dd3fd0976110ef287970d2d7da Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 2 Jun 2014 20:46:40 -0400 Subject: Restore the intent of this test --- tests/test_summary.py | 12 +++++++++--- 1 file 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", """\ -- cgit v1.2.1