void () { final String path = "resolve/" + getTestName(false); myFixture.copyDirectoryToProject(path + "/pkg", "pkg"); myFixture.configureByFile(path + "/main.py"); runWithAdditionalClassEntryInSdkRoots( path + "/lib", () -> { final PsiElement element = PyResolveTestCase.findReferenceByMarker(myFixture.getFile()).resolve(); assertInstanceOf(element, PyFunction.class); final PsiFile file = element.getContainingFile(); assertEquals("foo.py", file.getName()); assertEquals("src", file.getParent().getParent().getName()); } ); }