From 05d0fcd13ea0defd9cdb5c4982b895bf0094dfd7 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 7 Apr 2021 16:57:39 -0700 Subject: Fix broken test for MutableSet.pop() (GH-25209) (GH-25270) --- Lib/test/test_collections.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index 58f65f3..a961821 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -1423,8 +1423,12 @@ class TestCollectionABCs(ABCTestCase): return result def __repr__(self): return "MySet(%s)" % repr(list(self)) - s = MySet([5,43,2,1]) - self.assertEqual(s.pop(), 1) + items = [5,43,2,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): empty = WithSet() -- cgit v0.12