]> granicus.if.org Git - python/commitdiff
Fix a bug in test_dict and test_userdict, found at the PyPy sprint.
authorGeorg Brandl <georg@python.org>
Sun, 4 Mar 2007 17:18:54 +0000 (17:18 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 4 Mar 2007 17:18:54 +0000 (17:18 +0000)
Lib/test/test_dict.py
Lib/test/test_userdict.py

index 6d6e245d42b4f1165df02be9e0142bd0769965ea..e99c46d96554e9e2d06cda4b8f6c4cf61cf5acba 100644 (file)
@@ -430,7 +430,7 @@ class DictTest(unittest.TestCase):
         except RuntimeError, err:
             self.assertEqual(err.args, (42,))
         else:
-            self.fail_("e[42] didn't raise RuntimeError")
+            self.fail("e[42] didn't raise RuntimeError")
         class F(dict):
             def __init__(self):
                 # An instance variable __missing__ should have no effect
@@ -441,7 +441,7 @@ class DictTest(unittest.TestCase):
         except KeyError, err:
             self.assertEqual(err.args, (42,))
         else:
-            self.fail_("f[42] didn't raise KeyError")
+            self.fail("f[42] didn't raise KeyError")
         class G(dict):
             pass
         g = G()
@@ -450,7 +450,7 @@ class DictTest(unittest.TestCase):
         except KeyError, err:
             self.assertEqual(err.args, (42,))
         else:
-            self.fail_("g[42] didn't raise KeyError")
+            self.fail("g[42] didn't raise KeyError")
 
     def test_tuple_keyerror(self):
         # SF #1576657
index a4b7de406bff2b09d2ecfd4a4860dafd9a4c3a18..357c0f04a31440b814b9c8e7580b07580e268707 100644 (file)
@@ -174,7 +174,7 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol):
         except RuntimeError, err:
             self.assertEqual(err.args, (42,))
         else:
-            self.fail_("e[42] didn't raise RuntimeError")
+            self.fail("e[42] didn't raise RuntimeError")
         class F(UserDict.UserDict):
             def __init__(self):
                 # An instance variable __missing__ should have no effect
@@ -186,7 +186,7 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol):
         except KeyError, err:
             self.assertEqual(err.args, (42,))
         else:
-            self.fail_("f[42] didn't raise KeyError")
+            self.fail("f[42] didn't raise KeyError")
         class G(UserDict.UserDict):
             pass
         g = G()
@@ -195,7 +195,7 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol):
         except KeyError, err:
             self.assertEqual(err.args, (42,))
         else:
-            self.fail_("g[42] didn't raise KeyError")
+            self.fail("g[42] didn't raise KeyError")
 
 ##########################
 # Test Dict Mixin