Skip to content

Commit

Permalink
Fix test_typing.test_readonly_inheritance (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Jan 8, 2025
1 parent 15d48b2 commit dbf852b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test_typing_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4624,13 +4624,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_make_mutable_key_readonly(self):
class Base(TypedDict):
Expand Down

0 comments on commit dbf852b

Please sign in to comment.