mirror of https://github.com/python/cpython.git
bpo-46482: add a test for `typing.Annotation.__new__` (GH-30821)
This commit is contained in:
parent
ee0ac328d3
commit
4c0612ad00
|
@ -4643,6 +4643,13 @@ class A(typing.Match):
|
|||
|
||||
class AnnotatedTests(BaseTestCase):
|
||||
|
||||
def test_new(self):
|
||||
with self.assertRaisesRegex(
|
||||
TypeError,
|
||||
'Type Annotated cannot be instantiated',
|
||||
):
|
||||
Annotated()
|
||||
|
||||
def test_repr(self):
|
||||
self.assertEqual(
|
||||
repr(Annotated[int, 4, 5]),
|
||||
|
|
Loading…
Reference in New Issue