remove unused function

--HG--
branch : trunk
This commit is contained in:
holger krekel 2009-06-11 14:49:49 +02:00
parent c2415d7eee
commit 6956d1a7e4
2 changed files with 2 additions and 15 deletions

View File

@ -53,12 +53,12 @@ class PluginManager(object):
def getplugins(self):
return list(self.comregistry)
# API for bootstrapping
#
def getplugin(self, importname):
impname = canonical_importname(importname)
return self.impname2plugin[impname]
# API for bootstrapping
#
def _envlist(self, varname):
val = py.std.os.environ.get(varname, None)
if val is not None:
@ -144,10 +144,6 @@ class PluginManager(object):
# API for interacting with registered and instantiated plugin objects
#
#
def getfirst(self, attrname):
for x in self.comregistry.listattr(attrname):
return x
def listattr(self, attrname, plugins=None, extra=()):
return self.comregistry.listattr(attrname, plugins=plugins, extra=extra)

View File

@ -197,15 +197,6 @@ class TestPytestPluginInteractions:
# lower level API
def test_getfirst(self):
pluginmanager = PluginManager()
class My1:
x = 1
assert pluginmanager.getfirst("x") is None
pluginmanager.register(My1())
assert pluginmanager.getfirst("x") == 1
def test_listattr(self):
pluginmanager = PluginManager()
class My2: