diff options
Diffstat (limited to 'tests/test_coverage.py')
-rw-r--r-- | tests/test_coverage.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_coverage.py b/tests/test_coverage.py index 33f644fa..565fa4e1 100644 --- a/tests/test_coverage.py +++ b/tests/test_coverage.py @@ -46,7 +46,7 @@ class TestCoverageTest(CoverageTest): def test_failed_coverage(self): # If the lines are wrong, the message shows right and wrong. - with self.assertRaisesRegexp(AssertionError, r"\[1, 2] != \[1]"): + with self.assertRaisesRegex(AssertionError, r"\[1, 2] != \[1]"): self.check_coverage("""\ a = 1 b = 2 @@ -55,7 +55,7 @@ class TestCoverageTest(CoverageTest): ) # If the list of lines possibilities is wrong, the msg shows right. msg = r"None of the lines choices matched \[1, 2]" - with self.assertRaisesRegexp(AssertionError, msg): + with self.assertRaisesRegex(AssertionError, msg): self.check_coverage("""\ a = 1 b = 2 @@ -63,7 +63,7 @@ class TestCoverageTest(CoverageTest): ([1], [2]) ) # If the missing lines are wrong, the message shows right and wrong. - with self.assertRaisesRegexp(AssertionError, r"'3' != '37'"): + with self.assertRaisesRegex(AssertionError, r"'3' != '37'"): self.check_coverage("""\ a = 1 if a == 2: @@ -74,7 +74,7 @@ class TestCoverageTest(CoverageTest): ) # If the missing lines possibilities are wrong, the msg shows right. msg = r"None of the missing choices matched '3'" - with self.assertRaisesRegexp(AssertionError, msg): + with self.assertRaisesRegex(AssertionError, msg): self.check_coverage("""\ a = 1 if a == 2: @@ -1671,7 +1671,7 @@ class ReportingTest(CoverageTest): def test_no_data_to_report_on_annotate(self): # Reporting with no data produces a nice message and no output dir. - with self.assertRaisesRegexp(CoverageException, "No data to report."): + with self.assertRaisesRegex(CoverageException, "No data to report."): self.command_line("annotate -d ann") self.assert_doesnt_exist("ann") @@ -1681,12 +1681,12 @@ class ReportingTest(CoverageTest): def test_no_data_to_report_on_html(self): # Reporting with no data produces a nice message and no output dir. - with self.assertRaisesRegexp(CoverageException, "No data to report."): + with self.assertRaisesRegex(CoverageException, "No data to report."): self.command_line("html -d htmlcov") self.assert_doesnt_exist("htmlcov") def test_no_data_to_report_on_xml(self): # Reporting with no data produces a nice message. - with self.assertRaisesRegexp(CoverageException, "No data to report."): + with self.assertRaisesRegex(CoverageException, "No data to report."): self.command_line("xml") self.assert_doesnt_exist("coverage.xml") |