File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -251,11 +251,13 @@ def pytest_runtest_makereport(item, call):
251
251
elif call .when == "call" :
252
252
strict_default = item .config .getini ('xfail_strict' )
253
253
is_strict_xfail = evalxfail .get ('strict' , strict_default )
254
+ explanation = evalxfail .getexplanation ()
254
255
if is_strict_xfail :
255
256
rep .outcome = "failed"
257
+ rep .longrepr = "[XPASS(strict)] {0}" .format (explanation )
256
258
else :
257
259
rep .outcome = "passed"
258
- rep .wasxfail = evalxfail . getexplanation ()
260
+ rep .wasxfail = explanation
259
261
elif evalskip is not None and rep .skipped and type (rep .longrepr ) is tuple :
260
262
# skipped by mark.skipif; change the location of the failure
261
263
# to point to the item definition, otherwise it will display
You can’t perform that action at this time.
0 commit comments