summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_set.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-10-11 00:49:57 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-10-11 00:49:57 (GMT)
commitf10a79aad4e2fc62d2c3675e89f873b22b185e7b (patch)
tree06b042ca03a71663d26ad95949807d1bd2472bf4 /Lib/test/test_set.py
parent2d8dcdcb06005858e87eded012ceff10920445b7 (diff)
downloadcpython-f10a79aad4e2fc62d2c3675e89f873b22b185e7b.zip
cpython-f10a79aad4e2fc62d2c3675e89f873b22b185e7b.tar.gz
cpython-f10a79aad4e2fc62d2c3675e89f873b22b185e7b.tar.bz2
merge from trunk
Diffstat (limited to 'Lib/test/test_set.py')
-rw-r--r--Lib/test/test_set.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index 0e92551..0effd65 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -391,6 +391,17 @@ class TestSet(TestJointOps):
else:
self.fail()
+ def test_remove_keyerror_set(self):
+ key = self.thetype([3, 4])
+ try:
+ self.s.remove(key)
+ except KeyError as e:
+ self.assert_(e.args[0] is key,
+ "KeyError should be {0}, not {1}".format(key,
+ e.args[0]))
+ else:
+ self.fail()
+
def test_discard(self):
self.s.discard('a')
self.assert_('a' not in self.s)