From 51077636f6975065ad98ca8a29c66b8eca5b59fa Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Wed, 19 Jan 2022 17:13:38 +0300 Subject: [PATCH] [3.9] bpo-46416: Allow direct invocation of `Lib/test/test_typing.py` (GH-30641) Use `__name__`. (cherry picked from commit 2792d6d18eab3efeb71e6397f88db86e610541f1) Co-authored-by: Nikita Sobolev --- Lib/test/test_typing.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index cb6be2cee87d7a..8c6a8575211b6f 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -4310,6 +4310,11 @@ def test_annotated_in_other_types(self): X = List[Annotated[T, 5]] self.assertEqual(X[int], List[Annotated[int, 5]]) + def test_annotated_mro(self): + class X(Annotated[int, (1, 10)]): ... + self.assertEqual(X.__mro__, (X, int, object), + "Annotated should be transparent.") + class AllTests(BaseTestCase): """Tests for __all__."""