Skip to content

Commit 1c3f2ed

Browse files
authored
Fix test_typeddict_errors test case on Python 3.11 (#28)
Integers are now accepted as types in many runtime contexts: python/cpython#90802 Fixes #24.
1 parent 7c4d002 commit 1c3f2ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/testextensions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ def test_typeddict_errors(self):
8989
with self.assertRaises(TypeError):
9090
issubclass(dict, Emp) # type: ignore
9191
with self.assertRaises(TypeError):
92-
TypedDict('Hi', x=1)
92+
TypedDict('Hi', x=())
9393
with self.assertRaises(TypeError):
94-
TypedDict('Hi', [('x', int), ('y', 1)])
94+
TypedDict('Hi', [('x', int), ('y', ())])
9595
with self.assertRaises(TypeError):
9696
TypedDict('Hi', [('x', int)], y=int)
9797

0 commit comments

Comments
 (0)