Skip to content

Commit 971a52b

Browse files
authored
gh-128617: Fix test_typing.test_readonly_inheritance (#128618)
1 parent 474e419 commit 971a52b

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
@@ -8912,13 +8912,13 @@ class Child1(Base1):
89128912
self.assertEqual(Child1.__mutable_keys__, frozenset({'b'}))
89138913

89148914
class Base2(TypedDict):
8915-
a: ReadOnly[int]
8915+
a: int
89168916

89178917
class Child2(Base2):
8918-
b: str
8918+
b: ReadOnly[str]
89198919

8920-
self.assertEqual(Child1.__readonly_keys__, frozenset({'a'}))
8921-
self.assertEqual(Child1.__mutable_keys__, frozenset({'b'}))
8920+
self.assertEqual(Child2.__readonly_keys__, frozenset({'b'}))
8921+
self.assertEqual(Child2.__mutable_keys__, frozenset({'a'}))
89228922

89238923
def test_cannot_make_mutable_key_readonly(self):
89248924
class Base(TypedDict):

0 commit comments

Comments
 (0)