Skip to content

Commit 05d0fcd

Browse files
Fix broken test for MutableSet.pop() (GH-25209) (GH-25270)
1 parent 4554ab4 commit 05d0fcd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Lib/test/test_collections.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,8 +1423,12 @@ def discard(self,v):
14231423
return result
14241424
def __repr__(self):
14251425
return "MySet(%s)" % repr(list(self))
1426-
s = MySet([5,43,2,1])
1427-
self.assertEqual(s.pop(), 1)
1426+
items = [5,43,2,1]
1427+
s = MySet(items)
1428+
r = s.pop()
1429+
self.assertEquals(len(s), len(items) - 1)
1430+
self.assertNotIn(r, s)
1431+
self.assertIn(r, items)
14281432

14291433
def test_issue8750(self):
14301434
empty = WithSet()

0 commit comments

Comments
 (0)