use of com.jetbrains.python.psi.impl.PyFileImpl in project intellij-community by JetBrains.
the class PyOptimizeImportsTest method testExtractImportBlockWithIntermediateComments.
public void testExtractImportBlockWithIntermediateComments() {
myFixture.configureByFile(getTestName(true) + ".py");
final PyFileImpl file = assertInstanceOf(myFixture.getFile(), PyFileImpl.class);
final List<PyImportStatementBase> block = file.getImportBlock();
assertSize(2, block);
}
use of com.jetbrains.python.psi.impl.PyFileImpl in project intellij-community by JetBrains.
the class PyStubsTest method testNameInExcept.
public void testNameInExcept() {
final PyFileImpl file = (PyFileImpl) getTestFile();
final PsiElement element = file.findExportedName("md5");
assertTrue(element != null ? element.toString() : "null", element instanceof PyTargetExpression);
assertNotParsed(file);
}
use of com.jetbrains.python.psi.impl.PyFileImpl in project intellij-community by JetBrains.
the class PyStubsTest method testAugAssignDunderAll.
public void testAugAssignDunderAll() {
final PyFileImpl file = (PyFileImpl) getTestFile();
final List<String> all = file.getDunderAll();
assertNull(all);
assertNotParsed(file);
}
use of com.jetbrains.python.psi.impl.PyFileImpl in project intellij-community by JetBrains.
the class PyStubsTest method testWrappedStaticMethod.
public void testWrappedStaticMethod() {
final PyFileImpl file = (PyFileImpl) getTestFile();
final PyClass pyClass = file.getTopLevelClasses().get(0);
final PyFunction[] methods = pyClass.getMethods();
assertEquals(1, methods.length);
final PyFunction.Modifier modifier = methods[0].getModifier();
assertEquals(PyFunction.Modifier.STATICMETHOD, modifier);
assertNotParsed(file);
}
use of com.jetbrains.python.psi.impl.PyFileImpl in project intellij-community by JetBrains.
the class PyStubsTest method testDynamicDunderAll.
public void testDynamicDunderAll() {
final PyFileImpl file = (PyFileImpl) getTestFile();
final List<String> all = file.getDunderAll();
assertNull(all);
assertNotParsed(file);
}
Aggregations