From: Georg Brandl Date: Wed, 3 Jun 2009 23:23:45 +0000 (+0000) Subject: Avoid PendingDeprecationWarnings emitted by deprecated unittest methods. X-Git-Tag: v2.7a1~1035 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19e79f79ce18febb840df33df93d44c4a1215ad4;p=python Avoid PendingDeprecationWarnings emitted by deprecated unittest methods. --- diff --git a/Lib/test/test_pep352.py b/Lib/test/test_pep352.py index e33552809f..5f578d2673 100644 --- a/Lib/test/test_pep352.py +++ b/Lib/test/test_pep352.py @@ -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):