From 6956d1a7e4efc609be4ee6c6cbffa7d2d1638085 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Thu, 11 Jun 2009 14:49:49 +0200 Subject: [PATCH] remove unused function --HG-- branch : trunk --- py/test/pluginmanager.py | 8 ++------ py/test/testing/test_pluginmanager.py | 9 --------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/py/test/pluginmanager.py b/py/test/pluginmanager.py index 0b4999ab8..933085263 100644 --- a/py/test/pluginmanager.py +++ b/py/test/pluginmanager.py @@ -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) diff --git a/py/test/testing/test_pluginmanager.py b/py/test/testing/test_pluginmanager.py index af96b9fb8..a3eb55595 100644 --- a/py/test/testing/test_pluginmanager.py +++ b/py/test/testing/test_pluginmanager.py @@ -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: