'Verify that L{modules.walkModules} ignores entries in sys.path which
refer to regular files in the filesystem.'

def test_nonDirectoryPaths(self):

    existentPath = self.pathEntryWithOnePackage()
    nonDirectoryPath = FilePath(self.mktemp())
    self.assertFalse(nonDirectoryPath.exists())
    nonDirectoryPath.setContent('zip    file    or    whatever\n')
    self.replaceSysPath([existentPath.path])
    beforeModules = list(modules.walkModules())
    sys.path.append(nonDirectoryPath.path)
    afterModules = list(modules.walkModules())
    self.assertEqual(beforeModules, afterModules)
