# HG changeset patch -- Bitbucket.org
# Project pytest
# URL http://bitbucket.org/hpk42/pytest/overview
# User holger krekel <hol...@merlinux.eu>
# Date 1291656724 -3600
# Node ID f9e54a46a0e8f53550a56927d5b9e00acf7ea310
# Parent  3b67bd77f30b91a56847d5a565f80e74979443ee
fix hasplugin() method / test failures

--- a/_pytest/core.py
+++ b/_pytest/core.py
@@ -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:

--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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
_______________________________________________
py-svn mailing list
py-svn@codespeak.net
http://codespeak.net/mailman/listinfo/py-svn

Reply via email to