From 80ab4d8ff572e65e4b1a84d79cd3762ef810b95f Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 30 Aug 2018 01:14:48 +0200 Subject: [PATCH] Add tests for typing.TYPE_CHECKING --- test/completion/pep0484_typing.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/completion/pep0484_typing.py b/test/completion/pep0484_typing.py index 1dc633aa..26658ef6 100644 --- a/test/completion/pep0484_typing.py +++ b/test/completion/pep0484_typing.py @@ -318,3 +318,13 @@ class WithTypeVar(typing.Generic[TYPE_VAR]): def maaan(p: WithTypeVar[int]): #? int() p.lala() + + +if typing.TYPE_CHECKING: + with_type_checking = 1 +else: + without_type_checking = 1.0 +#? int() +with_type_checking +#? +without_type_checking