summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_set.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2006-12-08 17:35:25 (GMT)
committerRaymond Hettinger <python@rcn.com>2006-12-08 17:35:25 (GMT)
commitc789f341bb3d1a7689110238669360fc8f379c44 (patch)
tree4c2095b9b7842d240e3c64f75a0fa905ec939a6f /Lib/test/test_set.py
parent9c14ffbc7831ba9497ce98dfb951605ab542aefb (diff)
downloadcpython-c789f341bb3d1a7689110238669360fc8f379c44.zip
cpython-c789f341bb3d1a7689110238669360fc8f379c44.tar.gz
cpython-c789f341bb3d1a7689110238669360fc8f379c44.tar.bz2
Add test for SF bug 1576657
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 0268be2..422cc41 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -293,6 +293,17 @@ class TestSet(TestJointOps):
self.assert_(self.thetype(self.word) not in s)
self.assertRaises(KeyError, self.s.remove, self.thetype(self.word))
+ def test_remove_keyerror_unpacking(self):
+ # bug: www.python.org/sf/1576657
+ for v1 in ['Q', (1,)]:
+ try:
+ self.s.remove(v1)
+ except KeyError, e:
+ v2 = e.args[0]
+ self.assertEqual(v1, v2)
+ else:
+ self.fail()
+
def test_discard(self):
self.s.discard('a')
self.assert_('a' not in self.s)