[Python-checkins] cpython (merge 3.6 -> default): Issue #28649: fix-typing-test-v2.diff (3.6->3.7)
guido.van.rossum
python-checkins at python.org
Wed Nov 9 16:19:57 EST 2016
https://hg.python.org/cpython/rev/fd47a9d791b9
changeset: 105023:fd47a9d791b9
parent: 105020:00e386ac7b95
parent: 105022:43be7891b1f5
user: Guido van Rossum <guido at python.org>
date: Wed Nov 09 13:19:01 2016 -0800
summary:
Issue #28649: fix-typing-test-v2.diff (3.6->3.7)
files:
Lib/test/test_typing.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -743,10 +743,11 @@
self.assertEqual(repr(Callable[[], List[T]][int]).replace('typing.', ''),
'Callable[[], List[int]]')
- def test_generic_forvard_ref(self):
- def foobar(x: List[List['T']]): ...
+ def test_generic_forward_ref(self):
+ def foobar(x: List[List['CC']]): ...
+ class CC: ...
+ self.assertEqual(get_type_hints(foobar, globals(), locals()), {'x': List[List[CC]]})
T = TypeVar('T')
- self.assertEqual(get_type_hints(foobar, globals(), locals()), {'x': List[List[T]]})
def barfoo(x: Tuple[T, ...]): ...
self.assertIs(get_type_hints(barfoo, globals(), locals())['x'], Tuple[T, ...])
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list