fix hasplugin() method / test failures

This commit is contained in:
holger krekel 2010-12-06 18:32:04 +01:00
parent 513482f4f7
commit feea4ea3d5
2 changed files with 6 additions and 8 deletions

View File

@ -1,9 +1,11 @@
Changes between 2.0.0 and 2.0.1.dev1
----------------------------------------------
- fix issue9: direct setup/teardown functions for an xfail-marked
test will report as xfail if they fail (but reported as normal
passing setup/teardown).
- fix issue9: setup/teardown functions for an xfail-marked
test will report as xfail if they fail but report as normally
passing (not xpassing) if they succeed. This only is true
for "direct" setup/teardown invocations because teardown_class/
teardown_module cannot closely relate to a single test.
- fix issue8: no logging errors at process exit
- refinements to "collecting" output on non-ttys
- refine internal plugin registration and --traceconfig output

View File

@ -119,11 +119,7 @@ class PluginManager(object):
py.test.skip("plugin %r is missing" % name)
def hasplugin(self, name):
try:
self.getplugin(name)
return True
except KeyError:
return False
return bool(self.getplugin(name))
def getplugin(self, name):
if name is None: