summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2019-11-11 04:12:04 (GMT)
committerGitHub <noreply@github.com>2019-11-11 04:12:04 (GMT)
commit84ac4376587e35d16b4d0977c4f330d9d04b690a (patch)
tree68ca88ec65917ab19cca62c3698dd52accf01f3e /Lib/test
parentaf46450bb97ab9bd38748e75aa849c29fdd70028 (diff)
downloadcpython-84ac4376587e35d16b4d0977c4f330d9d04b690a.zip
cpython-84ac4376587e35d16b4d0977c4f330d9d04b690a.tar.gz
cpython-84ac4376587e35d16b4d0977c4f330d9d04b690a.tar.bz2
bpo-38761: Register WeakSet as a MutableSet (GH-17104)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_weakset.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_weakset.py b/Lib/test/test_weakset.py
index 569facd..49a9b5c 100644
--- a/Lib/test/test_weakset.py
+++ b/Lib/test/test_weakset.py
@@ -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()