allow each instance of PyCallableType to tell whether it's actually callable or not; distinguish class definition and class instance for Java class types; correctly treat Java constructors as callable (PY-4269)

This commit is contained in:
Dmitry Jemerov
2013-02-27 16:07:05 +01:00
parent f4ad359267
commit 066ddf137d
8 changed files with 74 additions and 20 deletions

View File

@@ -0,0 +1,22 @@
package com.jetbrains.jython;
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
import com.jetbrains.python.PythonTestUtil;
import com.jetbrains.python.inspections.PyCallingNonCallableInspection;
/**
* @author yole
*/
public class PyJythonHighlightingTest extends LightCodeInsightFixtureTestCase {
public void testCallableJavaClass() {
myFixture.configureByFile("callableJavaClass.py");
myFixture.enableInspections(PyCallingNonCallableInspection.class);
myFixture.checkHighlighting(true, false, false);
}
@Override
protected String getTestDataPath() {
return PythonTestUtil.getTestDataPath() + "/highlighting/jython/";
}
}