checkAutoindenter(text, 2, 2, 2, 2, AutoindenterTest.TRIGGER_ENTER, expected, false);
}
private static void checkAutoindenter(String text, int line1, int column1, int line2, int column2,
final SignalEvent trigger, String expected, boolean allowScheduling) {
PathUtil path = new PathUtil("test.py");
TestUtils.MockIncrementalScheduler parseScheduler = new TestUtils.MockIncrementalScheduler();
Document document = Document.createFromString(text);
DocumentParser documentParser = createDocumentParser(path, true, parseScheduler, document);
Editor editor = Editor.create(new MockAppContext());
editor.setDocument(document);