Kaydet (Commit) 19e79f79 authored tarafından Georg Brandl's avatar Georg Brandl

Avoid PendingDeprecationWarnings emitted by deprecated unittest methods.

üst 0eca77c4
...@@ -26,7 +26,7 @@ class ExceptionClassTests(unittest.TestCase): ...@@ -26,7 +26,7 @@ class ExceptionClassTests(unittest.TestCase):
ignore_message_warning() ignore_message_warning()
for attr in ("args", "message", "__str__", "__repr__", for attr in ("args", "message", "__str__", "__repr__",
"__getitem__"): "__getitem__"):
self.failUnless(hasattr(ins, attr), self.assertTrue(hasattr(ins, attr),
"%s missing %s attribute" % "%s missing %s attribute" %
(ins.__class__.__name__, attr)) (ins.__class__.__name__, attr))
...@@ -88,7 +88,7 @@ class ExceptionClassTests(unittest.TestCase): ...@@ -88,7 +88,7 @@ class ExceptionClassTests(unittest.TestCase):
def interface_test_driver(self, results): def interface_test_driver(self, results):
for test_name, (given, expected) in zip(self.interface_tests, 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)) given, expected))
def test_interface_single_arg(self): def test_interface_single_arg(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment