]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix broken test for MutableSet.pop() (GH-25209) (GH-25269)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 7 Apr 2021 23:56:48 +0000 (16:56 -0700)
committerGitHub <noreply@github.com>
Wed, 7 Apr 2021 23:56:48 +0000 (16:56 -0700)
Lib/test/test_collections.py

index 3ff660cf7a37be31c19790a47f9311de7cab6827..6a819358fe89f5420bfe81febbd0a45f75db6083 100644 (file)
@@ -1502,8 +1502,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()