document and refine/rename item **runtest** hook invocations

capture output separately for fixture and actual test run

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-06-09 16:08:34 +02:00
parent d16688a1e6
commit ed216e77d0
13 changed files with 236 additions and 127 deletions
+4 -2
View File
@@ -10,11 +10,13 @@ example:
"""
import py
def pytest_runtest_makereport(__call__, item, excinfo, when, outerr):
def pytest_runtest_makereport(__call__, item, call):
if call.when != "call":
return
if hasattr(item, 'obj') and hasattr(item.obj, 'func_dict'):
if 'xfail' in item.obj.func_dict:
res = __call__.execute(firstresult=True)
if excinfo:
if call.excinfo:
res.skipped = True
res.failed = res.passed = False
else: