[Python-checkins] r52966 - python/trunk/Lib/test/test_set.py
raymond.hettinger
python-checkins at python.org
Fri Dec 8 18:35:26 CET 2006
Author: raymond.hettinger
Date: Fri Dec 8 18:35:25 2006
New Revision: 52966
Modified:
python/trunk/Lib/test/test_set.py
Log:
Add test for SF bug 1576657
Modified: python/trunk/Lib/test/test_set.py
==============================================================================
--- python/trunk/Lib/test/test_set.py (original)
+++ python/trunk/Lib/test/test_set.py Fri Dec 8 18:35:25 2006
@@ -293,6 +293,17 @@
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)
More information about the Python-checkins
mailing list