We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30f068c commit 3312a84Copy full SHA for 3312a84
1 file changed
src/pytest_forked/__init__.py
@@ -88,4 +88,19 @@ def report_process_crash(item, result):
88
rep.sections.append(("captured stdout", result.out))
89
if result.err:
90
rep.sections.append(("captured stderr", result.err))
91
+
92
+ xfail_marker = item.get_closest_marker('xfail')
93
+ if not xfail_marker:
94
+ return rep
95
96
+ rep.outcome = "skipped"
97
+ rep.wasxfail = (
98
+ "reason: {xfail_reason}; "
99
+ "pytest-forked reason: {crash_info}".
100
+ format(
101
+ xfail_reason=xfail_marker.kwargs['reason'],
102
+ crash_info=info,
103
+ )
104
105
106
return rep
0 commit comments