summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dict.py
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-11-01 17:39:37 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-11-01 17:39:37 (GMT)
commitea13d9d86bf62c6f1d2ba0cc7cc7f9a7c0683e47 (patch)
treec2184842b163da5df6fd30c671c62083c73cb100 /Lib/test/test_dict.py
parent8291af2354d194fd60079380367f4ecb0eba5397 (diff)
downloadcpython-ea13d9d86bf62c6f1d2ba0cc7cc7f9a7c0683e47.zip
cpython-ea13d9d86bf62c6f1d2ba0cc7cc7f9a7c0683e47.tar.gz
cpython-ea13d9d86bf62c6f1d2ba0cc7cc7f9a7c0683e47.tar.bz2
Issue #10199: Moved Demo/turtle under Lib/
Diffstat (limited to 'Lib/test/test_dict.py')
-rw-r--r--Lib/test/test_dict.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_dict.py b/Lib/test/test_dict.py
index 818c99e..055bfd8 100644
--- a/Lib/test/test_dict.py
+++ b/Lib/test/test_dict.py
@@ -329,11 +329,19 @@ class DictTest(unittest.TestCase):
k, v = 'abc', 'def'
d[k] = v
self.assertRaises(KeyError, d.pop, 'ghi')
+ try:
+ d.pop('ghi')
+ except KeyError as e:
+ self.assertEquals(e.args[0], 'ghi')
self.assertEqual(d.pop(k), v)
self.assertEqual(len(d), 0)
self.assertRaises(KeyError, d.pop, k)
+ try:
+ d.pop(k)
+ except KeyError as e:
+ self.assertEquals(e.args[0], k)
self.assertEqual(d.pop(k, v), v)
d[k] = v