PyBlockEvaluator (String text, boolean skipEvaluatingCollectionItems) { PyBlockEvaluator eval = new PyBlockEvaluator(); if (skipEvaluatingCollectionItems) { eval.setEvaluateCollectionItems(false); } PyFile file = (PyFile)PsiFileFactory.getInstance(myFixture.getProject()).createFileFromText("a.py", PythonFileType.INSTANCE, text); eval.evaluate(file); return eval; }