diff -r c27269c0d619 Lib/test/test_typing.py --- a/Lib/test/test_typing.py Wed Nov 09 09:43:37 2016 -0500 +++ b/Lib/test/test_typing.py Wed Nov 09 20:04:36 2016 +0100 @@ -734,9 +734,10 @@ 'Callable[[], List[int]]') def test_generic_forvard_ref(self): - def foobar(x: List[List['T']]): ... + def foobar(x: List[List['CC']]): ... T = TypeVar('T') - self.assertEqual(get_type_hints(foobar, globals(), locals()), {'x': List[List[T]]}) + class CC: ... + self.assertEqual(get_type_hints(foobar, globals(), locals()), {'x': List[List[CC]]}) def barfoo(x: Tuple[T, ...]): ... self.assertIs(get_type_hints(barfoo, globals(), locals())['x'], Tuple[T, ...])