Add a staticmethod case to ^P test.

This commit is contained in:
Dmitry Cheryasov
2010-10-26 17:18:25 +03:00
parent d7ac2cb432
commit f69ed13de9
2 changed files with 13 additions and 1 deletions
@@ -0,0 +1,6 @@
class A(object):
@staticmethod
def foo(a, b):
return a,b
A().foo(<arg1>1, <arg2>2)
@@ -350,7 +350,13 @@ public class PyParameterInfoTest extends LightMarkedTestCase {
}
// TODO: add method tests with decorators when a mock SDK is available
public void testStaticmethod() throws Exception {
Map<String, PsiElement> marks = loadTest();
assertEquals("Test data sanity", marks.size(), 2);
feignCtrlP(marks.get("<arg1>").getTextOffset()).check("a,b", new String[]{"a,"});
feignCtrlP(marks.get("<arg2>").getTextOffset()).check("a,b", new String[]{"b"});
}
/**
* Imitates pressing of Ctrl+P; fails if results are not as expected.