bpo-38761: Register WeakSet as a MutableSet (GH-17104)

This commit is contained in:
Raymond Hettinger 2019-11-10 20:12:04 -08:00 committed by GitHub
parent af46450bb9
commit 84ac437658
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View file

@ -2,6 +2,7 @@ import unittest
from weakref import WeakSet
import string
from collections import UserString as ustr
from collections.abc import Set, MutableSet
import gc
import contextlib
@ -437,6 +438,10 @@ class TestWeakSet(unittest.TestCase):
def test_repr(self):
assert repr(self.s) == repr(self.s.data)
def test_abc(self):
self.assertIsInstance(self.s, Set)
self.assertIsInstance(self.s, MutableSet)
if __name__ == "__main__":
unittest.main()