-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
cpython/Lib/test/test_typing.py
Lines 8904 to 8921 in cdfb8bc
| def test_readonly_inheritance(self): | |
| class Base1(TypedDict): | |
| a: ReadOnly[int] | |
| class Child1(Base1): | |
| b: str | |
| self.assertEqual(Child1.__readonly_keys__, frozenset({'a'})) | |
| self.assertEqual(Child1.__mutable_keys__, frozenset({'b'})) | |
| class Base2(TypedDict): | |
| a: ReadOnly[int] | |
| class Child2(Base2): | |
| b: str | |
| self.assertEqual(Child1.__readonly_keys__, frozenset({'a'})) | |
| self.assertEqual(Child1.__mutable_keys__, frozenset({'b'})) |
Notice that it always tests Child1 and never Child2
Refs df4784b
I will send a PR.
Linked PRs
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error