diff options
author | Mark Shannon <mark@hotpy.org> | 2021-05-03 00:38:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-03 00:38:22 +0100 |
commit | 33ec88ac81f23668293d101b83367b086c795e5e (patch) | |
tree | ba5203f9375440ef1f63ceffe55f423d3b28195b /Lib/test/test_collections.py | |
parent | 9387fac100db359cbb6ec2a76f8a5eba8f9d7b65 (diff) | |
download | cpython-git-33ec88ac81f23668293d101b83367b086c795e5e.tar.gz |
bpo-43977: Make sure that tp_flags for pattern matching are inherited correctly. (GH-25813)
Diffstat (limited to 'Lib/test/test_collections.py')
-rw-r--r-- | Lib/test/test_collections.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index 98690d231e..2ba1a19ead 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -1967,6 +1967,12 @@ class TestCollectionABCs(ABCTestCase): self.assertEqual(len(mss), len(mss2)) self.assertEqual(list(mss), list(mss2)) + def test_illegal_patma_flags(self): + with self.assertRaises(TypeError): + class Both(Collection): + __abc_tpflags__ = (Sequence.__flags__ | Mapping.__flags__) + + ################################################################################ ### Counter |