use of com.jetbrains.python.structureView.PyStructureViewElement in project intellij-community by JetBrains.
the class PyStructureViewTest method testInvalidatedElement.
// EA-83566
public void testInvalidatedElement() {
myFixture.configureByText("a.py", "def f():\n" + " pass");
final PyFunction function = myFixture.findElementByText("f", PyFunction.class);
final PyStructureViewElement node = new PyStructureViewElement(function);
WriteCommandAction.runWriteCommandAction(myFixture.getProject(), function::delete);
assertNull(node.getValue());
final ItemPresentation presentation = node.getPresentation();
assertNotNull(presentation);
final Icon icon = presentation.getIcon(false);
assertNull(icon);
}
Aggregations