void () { final String path = "resolve/" + getTestName(false); myFixture.configureByFile(path + "/main.py"); runWithAdditionalClassEntryInSdkRoots( path + "/lib", () -> { final PsiReference reference = PyResolveTestCase.findReferenceByMarker(myFixture.getFile()); assertInstanceOf(reference, PsiPolyVariantReference.class); final ResolveResult[] results = ((PsiPolyVariantReference)reference).multiResolve(false); assertSize(1, results); final PsiElement element = results[0].getElement(); assertInstanceOf(element, PyFunction.class); assertEquals("foo.pyi", element.getContainingFile().getName()); } ); }