changeset: 105022:43be7891b1f5 branch: 3.6 parent: 105019:9e65bc305a24 parent: 105021:d790078797bd user: Guido van Rossum date: Wed Nov 09 13:19:00 2016 -0800 files: Lib/test/test_typing.py description: Issue #28649: fix-typing-test-v2.diff (3.5->3.6) diff -r 9e65bc305a24 -r 43be7891b1f5 Lib/test/test_typing.py --- a/Lib/test/test_typing.py Wed Nov 09 13:12:53 2016 -0800 +++ b/Lib/test/test_typing.py Wed Nov 09 13:19:00 2016 -0800 @@ -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, ...])