small fixes to test suite

This commit is contained in:
holger krekel
2011-11-18 16:03:02 +00:00
parent f946ab1835
commit e8ae2f9090
3 changed files with 4 additions and 2 deletions

View File

@@ -1,7 +1,8 @@
1.7
-------------------------
- fix incompatibilities with pytest-2.2.0
- fix incompatibilities with pytest-2.2.0 (allow multiple
pytest_runtest_logreport reports for a test item)
1.6
-------------------------

View File

@@ -195,13 +195,13 @@ class TestSlaveInteractor:
ids = ev.kwargs['ids']
assert len(ids) == 2
slave.sendcommand("runtests_all", )
slave.sendcommand("shutdown", )
for func in "::test_func", "::test_func2":
for i in range(3): # setup/call/teardown
ev = slave.popevent("testreport")
assert ev.name == "testreport"
rep = unserialize_report(ev.name, ev.kwargs['data'])
assert rep.nodeid.endswith(func)
slave.sendcommand("shutdown")
ev = slave.popevent("slavefinished")
assert 'slaveoutput' in ev.kwargs

View File

@@ -97,6 +97,7 @@ def forked_run_report(item):
from xdist.slavemanage import unserialize_report
def runforked():
try:
item.nextitem = None
reports = runtestprotocol(item, log=False)
except KeyboardInterrupt:
py.std.os._exit(EXITSTATUS_TESTEXIT)