mirror of
https://github.com/python/cpython.git
synced 2025-09-17 14:16:02 +00:00
Avoid PendingDeprecationWarnings emitted by deprecated unittest methods.
This commit is contained in:
parent
0eca77c40c
commit
19e79f79ce
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ class ExceptionClassTests(unittest.TestCase):
|
|||
ignore_message_warning()
|
||||
for attr in ("args", "message", "__str__", "__repr__",
|
||||
"__getitem__"):
|
||||
self.failUnless(hasattr(ins, attr),
|
||||
self.assertTrue(hasattr(ins, attr),
|
||||
"%s missing %s attribute" %
|
||||
(ins.__class__.__name__, attr))
|
||||
|
||||
|
@ -88,7 +88,7 @@ class ExceptionClassTests(unittest.TestCase):
|
|||
|
||||
def interface_test_driver(self, results):
|
||||
for test_name, (given, expected) in zip(self.interface_tests, results):
|
||||
self.failUnlessEqual(given, expected, "%s: %s != %s" % (test_name,
|
||||
self.assertEqual(given, expected, "%s: %s != %s" % (test_name,
|
||||
given, expected))
|
||||
|
||||
def test_interface_single_arg(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue