summaryrefslogtreecommitdiff
path: root/testtools/tests/test_testcase.py
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2022-06-06 14:15:05 +0300
committerGitHub <noreply@github.com>2022-06-06 14:15:05 +0300
commit3ee595fc0f4ce832f949057a594979fe74d988cc (patch)
tree0d52cd1c96b1e70c582e982003fb3f4b1c6e73e9 /testtools/tests/test_testcase.py
parent446e78409d258b17b457a8eecf302c28bc974ff5 (diff)
parentdf86fcb4234ea019c790247336cce041aa56350f (diff)
downloadtesttools-3ee595fc0f4ce832f949057a594979fe74d988cc.tar.gz
Merge branch 'master' into rm-3.5
Diffstat (limited to 'testtools/tests/test_testcase.py')
-rw-r--r--testtools/tests/test_testcase.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/testtools/tests/test_testcase.py b/testtools/tests/test_testcase.py
index 48f0dda..00cb60d 100644
--- a/testtools/tests/test_testcase.py
+++ b/testtools/tests/test_testcase.py
@@ -386,24 +386,24 @@ class TestAssertions(TestCase):
Raises(
MatchesException(self.failureException, f'.*{foo!r}.*')))
- def test_assertRaisesRegexp(self):
- # assertRaisesRegexp asserts that function raises particular exception
+ def test_assertRaisesRegex(self):
+ # assertRaisesRegex asserts that function raises particular exception
# with particular message.
self.assertRaisesRegex(RuntimeError, r"M\w*e", self.raiseError,
- RuntimeError, "Message")
+ RuntimeError, "Message")
- def test_assertRaisesRegexp_wrong_error_type(self):
+ def test_assertRaisesRegex_wrong_error_type(self):
# If function raises an exception of unexpected type,
- # assertRaisesRegexp re-raises it.
- self.assertRaises(ValueError, self.assertRaisesRegexp, RuntimeError,
+ # assertRaisesRegex re-raises it.
+ self.assertRaises(ValueError, self.assertRaisesRegex, RuntimeError,
r"M\w*e", self.raiseError, ValueError, "Message")
- def test_assertRaisesRegexp_wrong_message(self):
+ def test_assertRaisesRegex_wrong_message(self):
# If function raises an exception with unexpected message
- # assertRaisesRegexp fails.
+ # assertRaisesRegex fails.
self.assertFails(
'"Expected" does not match "Observed"',
- self.assertRaisesRegexp, RuntimeError, "Expected",
+ self.assertRaisesRegex, RuntimeError, "Expected",
self.raiseError, RuntimeError, "Observed")
def assertFails(self, message, function, *args, **kwargs):
@@ -1455,7 +1455,7 @@ class TestSkipping(TestCase):
def test_skip_causes_skipException(self):
self.assertThat(
- lambda: self.skip("Skip this test"),
+ lambda: self.skipTest("Skip this test"),
Raises(MatchesException(self.skipException)))
def test_can_use_skipTest(self):