def test_nonexistentPaths(self):
        existentPath = self.pathEntryWithOnePackage()

        nonexistentPath = FilePath(self.mktemp())
        self.failIf(nonexistentPath.exists())

        self.replaceSysPath([existentPath.path])

        expected = [modules.getModule("test_package")]

        beforeModules = list(modules.walkModules())
        sys.path.append(nonexistentPath.path)
        afterModules = list(modules.walkModules())

        self.assertEqual(beforeModules, expected)
        self.assertEqual(afterModules, expected)
Verify that L{modules.walkModules} ignores entries in sys.path which
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/test/test_modules.py/BasicTests.test_nonexistentPaths