[svn r63822] simplifying and strictifying the internal calls to plugins using

the new "api" mechanism.

--HG--
branch : trunk
This commit is contained in:
hpk
2009-04-08 12:06:21 +02:00
parent d10eae0313
commit 0300b2109c
8 changed files with 31 additions and 25 deletions
+4 -4
View File
@@ -22,12 +22,12 @@ class XfailPlugin(object):
res.failed = True
return res
def pytest_report_teststatus(self, event):
def pytest_report_teststatus(self, rep):
""" return shortletter and verbose word. """
if 'xfail' in event.keywords:
if event.skipped:
if 'xfail' in rep.keywords:
if rep.skipped:
return "xfailed", "x", "xfail"
elif event.failed:
elif rep.failed:
return "xpassed", "P", "xpass"
# a hook implemented called by the terminalreporter instance/plugin