diff --git a/python/testData/completion/returnType.after.py b/python/testData/completion/returnType.after.py new file mode 100644 index 000000000000..e926ec8bd3d7 --- /dev/null +++ b/python/testData/completion/returnType.after.py @@ -0,0 +1,9 @@ +class A: + def foo(self): + if (self.is_good): + y = self.xxx + else: + y = "str" + return y + def bar(self): + self.foo().count() diff --git a/python/testData/completion/returnType.py b/python/testData/completion/returnType.py new file mode 100644 index 000000000000..6f71fae85bd1 --- /dev/null +++ b/python/testData/completion/returnType.py @@ -0,0 +1,9 @@ +class A: + def foo(self): + if (self.is_good): + y = self.xxx + else: + y = "str" + return y + def bar(self): + self.foo().cou diff --git a/python/testSrc/com/jetbrains/python/PythonCompletionTest.java b/python/testSrc/com/jetbrains/python/PythonCompletionTest.java index 1da2b4123e2e..640906da6a6a 100644 --- a/python/testSrc/com/jetbrains/python/PythonCompletionTest.java +++ b/python/testSrc/com/jetbrains/python/PythonCompletionTest.java @@ -172,4 +172,8 @@ public class PythonCompletionTest extends PyLightFixtureTestCase { public void testSlots() throws Exception { // PY-1211 doTest(); } + + public void testReturnType() throws Exception { + doTest(); + } } \ No newline at end of file