mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
bpo-43977: Make sure that tp_flags for pattern matching are inherited correctly. (GH-25813)
This commit is contained in:
parent
9387fac100
commit
33ec88ac81
5 changed files with 69 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue