bpo-46482: add a test for typing.Annotation.__new__ (GH-30821)

(cherry picked from commit 4c0612ad00)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2022-02-01 02:27:36 -08:00 committed by GitHub
parent 34794517d1
commit 6a188d88c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4543,6 +4543,13 @@ class RETests(BaseTestCase):
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]),