Skip to content

Commit c0ba0bc

Browse files
[3.13] gh-128617: Fix test_typing.test_readonly_inheritance (GH-128618) (#128622)
gh-128617: Fix `test_typing.test_readonly_inheritance` (GH-128618) (cherry picked from commit 971a52b) Co-authored-by: sobolevn <[email protected]>
1 parent 32012ed commit c0ba0bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_typing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8829,13 +8829,13 @@ class Child1(Base1):
88298829
self.assertEqual(Child1.__mutable_keys__, frozenset({'b'}))
88308830

88318831
class Base2(TypedDict):
8832-
a: ReadOnly[int]
8832+
a: int
88338833

88348834
class Child2(Base2):
8835-
b: str
8835+
b: ReadOnly[str]
88368836

8837-
self.assertEqual(Child1.__readonly_keys__, frozenset({'a'}))
8838-
self.assertEqual(Child1.__mutable_keys__, frozenset({'b'}))
8837+
self.assertEqual(Child2.__readonly_keys__, frozenset({'b'}))
8838+
self.assertEqual(Child2.__mutable_keys__, frozenset({'a'}))
88398839

88408840
def test_cannot_make_mutable_key_readonly(self):
88418841
class Base(TypedDict):

0 commit comments

Comments
 (0)