summaryrefslogtreecommitdiff
path: root/tests/test_coverage.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-05-17 14:56:40 -0400
committerNed Batchelder <ned@nedbatchelder.com>2014-05-17 14:56:40 -0400
commitf5c6fd96beb04ccd7a86817ad5be1163f8409420 (patch)
tree063c9c92cc1ec679c323b310e8e2379fed34e469 /tests/test_coverage.py
parentb52c96fe479e4b30d19dd6be62a032791ac20ba3 (diff)
downloadpython-coveragepy-git-f5c6fd96beb04ccd7a86817ad5be1163f8409420.tar.gz
Avoid a bunch of deprecated functions.
Diffstat (limited to 'tests/test_coverage.py')
-rw-r--r--tests/test_coverage.py14
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")