diff options
Diffstat (limited to 'Lib/test/test_dict.py')
-rw-r--r-- | Lib/test/test_dict.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_dict.py b/Lib/test/test_dict.py index 717ed5e..ff6ccde 100644 --- a/Lib/test/test_dict.py +++ b/Lib/test/test_dict.py @@ -439,6 +439,16 @@ class DictTest(unittest.TestCase): else: self.fail_("g[42] didn't raise KeyError") + def test_tuple_keyerror(self): + # SF #1576657 + d = {} + try: + d[(1,)] + except KeyError, e: + self.assertEqual(e.args, ((1,),)) + else: + self.fail("missing KeyError") + from test import mapping_tests |