]> granicus.if.org Git - python/commitdiff
Avoid PendingDeprecationWarnings emitted by deprecated unittest methods.
authorGeorg Brandl <georg@python.org>
Wed, 3 Jun 2009 23:23:45 +0000 (23:23 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 3 Jun 2009 23:23:45 +0000 (23:23 +0000)
Lib/test/test_pep352.py

index e33552809f456144cce4ee4d999d9464f3e8d88c..5f578d26732b485ec343d1ef7a69c9b0baf47995 100644 (file)
@@ -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):