void () { myFixture.copyDirectoryToProject(getTestName(false), ""); final String root = PathUtil.toSystemIndependentName(myFixture.getTempDirPath()); final VirtualFile sourceRoot1 = myFixture.findFileInTempDir("src1"); final VirtualFile sourceRoot2 = myFixture.findFileInTempDir("src2"); final Module module = myFixture.getModule(); PsiTestUtil.addSourceRoot(module, sourceRoot1); PsiTestUtil.addSourceRoot(module, sourceRoot2); final RunnerAndConfigurationSettings settings = RunManager.getInstance(myFixture.getProject()).createConfiguration("test", PythonConfigurationType.class); final PythonRunConfiguration configuration = (PythonRunConfiguration)settings.getConfiguration(); configuration.setAddSourceRoots(true); Collection<String> path = collectProjectPythonPathEntries(configuration); assertContainsOrdered(path, root, root + "/src1", root + "/src2"); PsiTestUtil.removeSourceRoot(module, sourceRoot1); PsiTestUtil.addSourceRoot(module, sourceRoot1); path = collectProjectPythonPathEntries(configuration); assertContainsOrdered(path, root, root + "/src2", root + "/src1"); }