mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
bpo-46424: [typing] cover Annotation[arg] invalid usage in tests (GH-30663)
This commit is contained in:
parent
bdf2ab1887
commit
32398294fb
1 changed files with 4 additions and 0 deletions
|
|
@ -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, ...],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue