Skip to content

Commit 5107763

Browse files
committed
[3.9] bpo-46416: Allow direct invocation of Lib/test/test_typing.py (GH-30641)
Use `__name__`. (cherry picked from commit 2792d6d) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent 0064516 commit 5107763

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/test/test_typing.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4310,6 +4310,11 @@ def test_annotated_in_other_types(self):
43104310
X = List[Annotated[T, 5]]
43114311
self.assertEqual(X[int], List[Annotated[int, 5]])
43124312

4313+
def test_annotated_mro(self):
4314+
class X(Annotated[int, (1, 10)]): ...
4315+
self.assertEqual(X.__mro__, (X, int, object),
4316+
"Annotated should be transparent.")
4317+
43134318

43144319
class AllTests(BaseTestCase):
43154320
"""Tests for __all__."""

0 commit comments

Comments
 (0)