Skip to content

Commit b3e8722

Browse files
Fix broken test for MutableSet.pop() (GH-25209) (GH-25269)
1 parent 3b1cf20 commit b3e8722

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
@@ -1502,8 +1502,12 @@ def discard(self,v):
15021502
return result
15031503
def __repr__(self):
15041504
return "MySet(%s)" % repr(list(self))
1505-
s = MySet([5,43,2,1])
1506-
self.assertEqual(s.pop(), 1)
1505+
items = [5,43,2,1]
1506+
s = MySet(items)
1507+
r = s.pop()
1508+
self.assertEquals(len(s), len(items) - 1)
1509+
self.assertNotIn(r, s)
1510+
self.assertIn(r, items)
15071511

15081512
def test_issue8750(self):
15091513
empty = WithSet()

0 commit comments

Comments
 (0)