Fix handling of skipped modules with pytest.skip at module level
Fix #332
This commit is contained in:
@@ -259,10 +259,10 @@ class DSession(object):
|
||||
def worker_collectreport(self, node, rep):
|
||||
"""Emitted when a node calls the pytest_collectreport hook.
|
||||
|
||||
Because we only need the report when there's a failure, as optimization
|
||||
we only expect to receive failed reports from workers (#330).
|
||||
Because we only need the report when there's a failure/skip, as optimization
|
||||
we only expect to receive failed/skipped reports from workers (#330).
|
||||
"""
|
||||
assert rep.failed
|
||||
assert not rep.passed
|
||||
self._failed_worker_collectreport(node, rep)
|
||||
|
||||
def worker_logwarning(self, message, code, nodeid, fslocation):
|
||||
|
||||
@@ -110,8 +110,8 @@ class WorkerInteractor(object):
|
||||
self.sendevent("testreport", data=data)
|
||||
|
||||
def pytest_collectreport(self, report):
|
||||
# master only needs reports that failed, as optimization send only them instead (#330)
|
||||
if report.failed:
|
||||
# send only reports that have not passed to master as optimization (#330)
|
||||
if not report.passed:
|
||||
data = serialize_report(report)
|
||||
self.sendevent("collectreport", data=data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user