mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Fix a bug in test_dict and test_userdict, found at the PyPy sprint.
This commit is contained in:
parent
b5e3f0dfc6
commit
8905bb10e0
2 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue