Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ClassVar as string fails when getting type hints #6824

Merged
merged 5 commits into from
May 16, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add back a test that was accidentally removed
  • Loading branch information
nnja committed May 15, 2018
commit 79bfabb70256455c42f7808580fa404ab273ae74
8 changes: 8 additions & 0 deletions Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1553,6 +1553,14 @@ def foo(a: 'Node[T'):
with self.assertRaises(SyntaxError):
get_type_hints(foo)

def test_type_error(self):

def foo(a: Tuple['42']):
pass

with self.assertRaises(TypeError):
get_type_hints(foo)

def test_name_error(self):

def foo(a: 'Noode[T]'):
Expand Down