mirror of https://github.com/python/cpython.git
Avoid PendingDeprecationWarnings emitted by deprecated unittest methods.
This commit is contained in:
parent
0eca77c40c
commit
19e79f79ce
|
@ -26,7 +26,7 @@ def verify_instance_interface(self, ins):
|
|||
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 @@ def test_inheritance(self):
|
|||
|
||||
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…
Reference in New Issue