Skip to content

Commit

Permalink
Fix test_typeddict_errors test case on Python 3.11 (#28)
Browse files Browse the repository at this point in the history
Integers are now accepted as types in many runtime contexts:
python/cpython#90802

Fixes #24.
  • Loading branch information
JukkaL committed Jan 29, 2023
1 parent 7c4d002 commit 1c3f2ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testextensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ def test_typeddict_errors(self):
with self.assertRaises(TypeError):
issubclass(dict, Emp) # type: ignore
with self.assertRaises(TypeError):
TypedDict('Hi', x=1)
TypedDict('Hi', x=())
with self.assertRaises(TypeError):
TypedDict('Hi', [('x', int), ('y', 1)])
TypedDict('Hi', [('x', int), ('y', ())])
with self.assertRaises(TypeError):
TypedDict('Hi', [('x', int)], y=int)

Expand Down

0 comments on commit 1c3f2ed

Please sign in to comment.