void () { Consumer<VirtualFile> fileConsumer = file -> { doMultiFileAutoImportTest("Import", fix -> { final List<ImportCandidateHolder> candidates = fix.getCandidates(); final List<String> names = ContainerUtil.map(candidates, c -> c.getPresentableText()); assertSameElements(names, "os.path.commonpath"); return true; }); }; runWithAdditionalFileInLibDir( "ntpath.py", "def commonpath(paths):\n" + " pass", f -> runWithAdditionalFileInLibDir( "os.py", """ if windows(): import ntpath as path else: import posixpath as path""", f1 -> runWithAdditionalFileInLibDir( "posixpath.py", "def commonpath(paths):\n" + " pass", fileConsumer ) ) ); }