From 1c3f2ed002272f5a85b30675fe553e6b96fa763e Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Sun, 29 Jan 2023 12:13:14 +0000 Subject: [PATCH] Fix test_typeddict_errors test case on Python 3.11 (#28) Integers are now accepted as types in many runtime contexts: https://github.com/python/cpython/issues/90802 Fixes #24. --- tests/testextensions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testextensions.py b/tests/testextensions.py index 265f725..861962d 100644 --- a/tests/testextensions.py +++ b/tests/testextensions.py @@ -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)