'Verify that L{modules.walkModules} ignores entries in sys.path which
do not exist in the filesystem.'

def test_nonexistentPaths(self):

    existentPath = self.pathEntryWithOnePackage()
    nonexistentPath = FilePath(self.mktemp())
    self.assertFalse(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)
