summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Paul Calderone <exarkun@twistedmatrix.com>2014-12-12 20:04:35 -0500
committerJean-Paul Calderone <exarkun@twistedmatrix.com>2014-12-12 20:04:35 -0500
commit77b3d0888a38808f9f00440ada01001c55451356 (patch)
treeba4fef9b816973cd6ab74c2689e2641695094bd9
parenta35801674c3cd91c45b41f552e1a2ed96b62cbad (diff)
downloadpyopenssl-77b3d0888a38808f9f00440ada01001c55451356.tar.gz
Give assertIs and assertIsNot their stdlib-preferred names.
-rw-r--r--OpenSSL/test/util.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSSL/test/util.py b/OpenSSL/test/util.py
index 21bbdc4..4260eb0 100644
--- a/OpenSSL/test/util.py
+++ b/OpenSSL/test/util.py
@@ -227,7 +227,7 @@ class TestCase(TestCase):
failIfIn = assertNotIn
- def failUnlessIdentical(self, first, second, msg=None):
+ def assertIs(self, first, second, msg=None):
"""
Fail the test if :py:data:`first` is not :py:data:`second`. This is an
obect-identity-equality test, not an object equality
@@ -239,10 +239,10 @@ class TestCase(TestCase):
if first is not second:
raise self.failureException(msg or '%r is not %r' % (first, second))
return first
- assertIdentical = failUnlessIdentical
+ assertIdentical = failUnlessIdentical = assertIs
- def failIfIdentical(self, first, second, msg=None):
+ def assertIsNot(self, first, second, msg=None):
"""
Fail the test if :py:data:`first` is :py:data:`second`. This is an
obect-identity-equality test, not an object equality
@@ -254,7 +254,7 @@ class TestCase(TestCase):
if first is second:
raise self.failureException(msg or '%r is %r' % (first, second))
return first
- assertNotIdentical = failIfIdentical
+ assertNotIdentical = failIfIdentical = assertIsNot
def failUnlessRaises(self, exception, f, *args, **kwargs):