'Test that getCache skips over any entries in a plugin package\'s
C{__path__} which refer to children of paths which are not directories.'

def test_nonDirectoryChildEntry(self):

    path = FilePath(self.mktemp())
    self.assertFalse(path.exists())
    path.touch()
    child = path.child('test_package').path
    self.module.__path__.append(child)
    try:
        plgs = list(plugin.getPlugins(ITestPlugin, self.module))
        self.assertEqual(len(plgs), 1)
    finally:
        self.module.__path__.remove(child)
