void () { myFixture.configureByText(PythonFileType.INSTANCE, "ROOT_PATH = '/foo'\nTEMPLATES_DIR = os.path.join(ROOT_PATH, 'templates')"); PyFile file = (PyFile) myFixture.getFile(); final PyTargetExpression expression = file.findTopLevelAttribute("TEMPLATES_DIR"); final PyExpression value = expression.findAssignedValue(); final String result = FileUtil.toSystemIndependentName((String) new PyPathEvaluator("").evaluate(value)); assertEquals(result, "/foo/templates"); }