diff --git a/python/testData/resolve/InnerFuncVar.py b/python/testData/resolve/InnerFuncVar.py new file mode 100644 index 000000000000..57a8b542e671 --- /dev/null +++ b/python/testData/resolve/InnerFuncVar.py @@ -0,0 +1,4 @@ +def f1(): + foo = 1 + def f2(): + return foo \ No newline at end of file diff --git a/python/testData/resolve/TupleInComprh.py b/python/testData/resolve/TupleInComprh.py new file mode 100644 index 000000000000..806df915b4ec --- /dev/null +++ b/python/testData/resolve/TupleInComprh.py @@ -0,0 +1 @@ +[foo + bar for (foo, bar) in [(1,2),]] \ No newline at end of file diff --git a/python/testSrc/com/jetbrains/python/PyResolveTest.java b/python/testSrc/com/jetbrains/python/PyResolveTest.java index 67c939d0e1ed..53eeaca22abf 100644 --- a/python/testSrc/com/jetbrains/python/PyResolveTest.java +++ b/python/testSrc/com/jetbrains/python/PyResolveTest.java @@ -50,6 +50,16 @@ public class PyResolveTest extends ResolveTestCase { assertTrue(targetElement instanceof PyTargetExpression); } + public void testInnerFuncVar() throws Exception { + PsiElement targetElement = resolve(); + assertTrue(targetElement instanceof PyTargetExpression); + } + + public void testTupleInComprh() throws Exception { + PsiElement targetElement = resolve(); + assertTrue(targetElement instanceof PyTargetExpression); + } + public void testForStatement() throws Exception { PsiElement targetElement = resolve(); assertTrue(targetElement instanceof PyTargetExpression);