Skip to content

Commit

Permalink
pythongh-128617: Fix test_typing.test_readonly_inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Jan 8, 2025
1 parent cdfb8bc commit f76646b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8912,13 +8912,13 @@ class Child1(Base1):
self.assertEqual(Child1.__mutable_keys__, frozenset({'b'}))

class Base2(TypedDict):
a: ReadOnly[int]
a: int

class Child2(Base2):
b: str
b: ReadOnly[str]

self.assertEqual(Child1.__readonly_keys__, frozenset({'a'}))
self.assertEqual(Child1.__mutable_keys__, frozenset({'b'}))
self.assertEqual(Child2.__readonly_keys__, frozenset({'b'}))
self.assertEqual(Child2.__mutable_keys__, frozenset({'a'}))

def test_cannot_make_mutable_key_readonly(self):
class Base(TypedDict):
Expand Down

0 comments on commit f76646b

Please sign in to comment.