mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
convert old fail* assertions to assert*
This commit is contained in:
parent
98d23f2e06
commit
c9c0f201fe
275 changed files with 4540 additions and 4540 deletions
|
@ -14,8 +14,8 @@ class BinASCIITest(unittest.TestCase):
|
|||
|
||||
def test_exceptions(self):
|
||||
# Check module exceptions
|
||||
self.assert_(issubclass(binascii.Error, Exception))
|
||||
self.assert_(issubclass(binascii.Incomplete, Exception))
|
||||
self.assertTrue(issubclass(binascii.Error, Exception))
|
||||
self.assertTrue(issubclass(binascii.Incomplete, Exception))
|
||||
|
||||
def test_functions(self):
|
||||
# Check presence of all functions
|
||||
|
@ -26,10 +26,10 @@ class BinASCIITest(unittest.TestCase):
|
|||
prefixes.extend(["crc_", "rlecode_", "rledecode_"])
|
||||
for prefix in prefixes:
|
||||
name = prefix + suffix
|
||||
self.assert_(hasattr(getattr(binascii, name), '__call__'))
|
||||
self.assertTrue(hasattr(getattr(binascii, name), '__call__'))
|
||||
self.assertRaises(TypeError, getattr(binascii, name))
|
||||
for name in ("hexlify", "unhexlify"):
|
||||
self.assert_(hasattr(getattr(binascii, name), '__call__'))
|
||||
self.assertTrue(hasattr(getattr(binascii, name), '__call__'))
|
||||
self.assertRaises(TypeError, getattr(binascii, name))
|
||||
|
||||
def test_base64valid(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue