'Only plugins from the first package in sys.path should be returned by
getPlugins in the case where there are two Python packages by the same
name installed, each with a plugin module by a single name.'

def test_hiddenPackageSamePluginModuleNameObscured(self):

    root = FilePath(self.mktemp())
    root.makedirs()
    firstDirectory = self.createDummyPackage(root, 'first', 'someplugin')
    secondDirectory = self.createDummyPackage(root, 'second', 'someplugin')
    sys.path.append(firstDirectory.path)
    sys.path.append(secondDirectory.path)
    import dummy.plugins
    plugins = list(plugin.getPlugins(ITestPlugin, dummy.plugins))
    self.assertEqual(['first'], [p.__name__ for p in plugins])
