diff options
author | Guido van Rossum <guido@python.org> | 2016-11-09 21:19:00 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2016-11-09 21:19:00 (GMT) |
commit | 83be424700776962b93979e9c5a81ebe88a41730 (patch) | |
tree | a2b930cb9f9590cf1057bdaf3bd58daf8a44cdf2 | |
parent | b75f48580f85ef7d098bc73516a931794c10e21a (diff) | |
parent | f9099de8949af434eacb905680849ec3ac41348a (diff) | |
download | cpython-83be424700776962b93979e9c5a81ebe88a41730.zip cpython-83be424700776962b93979e9c5a81ebe88a41730.tar.gz cpython-83be424700776962b93979e9c5a81ebe88a41730.tar.bz2 |
Issue #28649: fix-typing-test-v2.diff (3.5->3.6)
-rw-r--r-- | 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 index ae9de61..0582845 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -743,10 +743,11 @@ class GenericTests(BaseTestCase): 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, ...]) |