mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-46482: add a test for typing.Annotation.__new__
(GH-30821)
This commit is contained in:
parent
ee0ac328d3
commit
4c0612ad00
1 changed files with 7 additions and 0 deletions
|
@ -4643,6 +4643,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]),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue