boolean (@NotNull final VirtualFile virtualFile, @NotNull final Project project) { @NonNls final String name = virtualFile.getName(); final HashSet<VirtualFile> roots = new HashSet<>(); final Module[] modules = ModuleManager.getInstance(project).getModules(); for (Module module : modules) { roots.addAll(PyUtil.getSourceRoots(module)); } Collections.addAll(roots, ProjectRootManager.getInstance(project).getContentRoots()); return StringUtil.toLowerCase(name).contains("test") || roots.contains(virtualFile); }