[svn r63883] * moving many more events to become ordinary plugin hook calls.

* bit hackish because the code for handling the old events is
  also still there ...

--HG--
branch : trunk
This commit is contained in:
hpk
2009-04-09 01:33:48 +02:00
parent ae412d3757
commit e6234fdb61
23 changed files with 232 additions and 185 deletions

View File

@@ -10,7 +10,7 @@ class DefaultPlugin:
else:
runner = basic_run_report
report = runner(item, pdb=pdb)
item.config.pytestplugins.notify("itemtestreport", report)
item.config.api.pytest_itemtestreport(rep=report)
return True
def pytest_item_makereport(self, item, excinfo, when, outerr):
@@ -20,8 +20,9 @@ class DefaultPlugin:
def pytest_item_runtest_finished(self, item, excinfo, outerr):
from py.__.test import runner
rep = runner.ItemTestReport(item, excinfo, "execute", outerr)
item.config.pytestplugins.notify("itemtestreport", rep)
item.config.api.pytest_itemtestreport(rep=rep)
# XXX make this access pyfuncitem.args or funcargs
def pytest_pyfunc_call(self, pyfuncitem, args, kwargs):
pyfuncitem.obj(*args, **kwargs)