summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_typing.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
index c8a077e..97c2c7f 100644
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -4609,6 +4609,10 @@ class AnnotatedTests(BaseTestCase):
with self.assertRaises(TypeError):
issubclass(int, Annotated[int, "positive"])
+ def test_too_few_type_args(self):
+ with self.assertRaisesRegex(TypeError, 'at least two arguments'):
+ Annotated[int]
+
def test_pickle(self):
samples = [typing.Any, typing.Union[int, str],
typing.Optional[str], Tuple[int, ...],