diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_typing.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 05140fc..42aa430 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -16,6 +16,7 @@ from typing import Generic, ClassVar, Final, final, Protocol from typing import cast, runtime_checkable from typing import get_type_hints from typing import get_origin, get_args +from typing import is_typeddict from typing import no_type_check, no_type_check_decorator from typing import Type from typing import NewType @@ -3900,6 +3901,12 @@ class TypedDictTests(BaseTestCase): 'voice': str, } + def test_is_typeddict(self): + assert is_typeddict(Point2D) is True + assert is_typeddict(Union[str, int]) is False + # classes, not instances + assert is_typeddict(Point2D()) is False + class IOTests(BaseTestCase): |