mirror of
https://github.com/python/cpython.git
synced 2025-09-29 11:45:57 +00:00
Fix broken test for MutableSet.pop() (GH-25209) (GH-25269)
This commit is contained in:
parent
3b1cf20297
commit
b3e8722853
1 changed files with 6 additions and 2 deletions
|
@ -1502,8 +1502,12 @@ class TestCollectionABCs(ABCTestCase):
|
||||||
return result
|
return result
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "MySet(%s)" % repr(list(self))
|
return "MySet(%s)" % repr(list(self))
|
||||||
s = MySet([5,43,2,1])
|
items = [5,43,2,1]
|
||||||
self.assertEqual(s.pop(), 1)
|
s = MySet(items)
|
||||||
|
r = s.pop()
|
||||||
|
self.assertEquals(len(s), len(items) - 1)
|
||||||
|
self.assertNotIn(r, s)
|
||||||
|
self.assertIn(r, items)
|
||||||
|
|
||||||
def test_issue8750(self):
|
def test_issue8750(self):
|
||||||
empty = WithSet()
|
empty = WithSet()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue