You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a parametrized test with marks=[pytest.mark.xfail] where I expect it to fail.
However, I get an exception when running shut pkg test --no-capture:
Traceback (most recent call last):
File "/.../bin/shut", line 8, in <module>
sys.exit(shut())
File "/.../lib/python3.9/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/.../lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/.../lib/python3.9/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/.../lib/python3.9/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/.../lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/.../lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/.../lib/python3.9/site-packages/shut/commands/pkg/test.py", line 153, in test
test_run = test_package(package, isolate, keep_test_env, capture)
File "/.../lib/python3.9/site-packages/shut/commands/pkg/test.py", line 70, in test_package
return package.test_driver.test_package(package, runtime, capture)
File "/.../lib/python3.9/site-packages/shut/test/pytest.py", line 126, in test_package
test_run = load_report_file(self.report_file)
File "/.../lib/python3.9/site-packages/shut/test/pytest.py", line 81, in load_report_file
test_status = {'passed': TestStatus.PASSED, 'failed': TestStatus.FAILED, 'skipped': TestStatus.SKIPPED}[test['outcome']]
KeyError: 'xfailed'
Indeed, only passed, failed and skipped are acknowledged. Whereas xfailed and xpassed are not.
Hey @Mulugruntz, the planned fix is here. Do you think it makes sense or should Shut understand xpassed/xfailed as concepts separate from passed/failed?
I have a parametrized test with
marks=[pytest.mark.xfail]
where I expect it to fail.However, I get an exception when running
shut pkg test --no-capture
:Indeed, only
passed
,failed
andskipped
are acknowledged. Whereasxfailed
andxpassed
are not.Documentation: https://docs.pytest.org/en/6.2.x/example/parametrize.html
The text was updated successfully, but these errors were encountered: