mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
merge from trunk
This commit is contained in:
parent
2d8dcdcb06
commit
f10a79aad4
40 changed files with 621 additions and 305 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue