[X] a detailed description of the bug or problem you are having
[NA] output of pip list from the virtual environment you are using
[X] pytest and operating system versions
[X] minimal example if possible
problem
when we mark a test as xfail either with strict or not, we expect to fail so in the report we should have it as outcome=passed. in the case of not strict, should always be passed or either xpass. on strict it should be fail if it didn't failed and passed or xfail otherwise
right now the only way of knowing if it was an xfail or skip is to check report.wasxfail attribute
pip list
from the virtual environment you are usingproblem
when we mark a test as
xfail
either with strict or not, we expect to fail so in the report we should have it asoutcome=passed
. in the case of not strict, should always bepassed
or eitherxpass
. on strict it should befail
if it didn't failed andpassed
orxfail
otherwiseright now the only way of knowing if it was an xfail or skip is to check
report.wasxfail
attributeminimal example
reference
https://github.com/pytest-dev/pytest/blob/f74e947c1fdfef238235b7dd18c8fe52108268f2/src/_pytest/skipping.py#L266-L292
in the code above we have some statements marking the outcome as
skipped
and actually one (I am unaware of that flow) aspassed