This change ensures that a test which crashes is reported to TeamCity as failed.
When using PyTest with the pytest-xdist plugin and one of the --forked, --boxed or -n options, tests will execute in Python subprocesses, which means individual tests can crash without crashing the main PyTest process. In case of a crash, the pytest_runtest_logreport hook is called with report.failed == True and report.when == '???' (undocumented behaviour). This PR modifies the TeamCity PyTest plugin to handle this case.
Example output:
##teamcity[testFailed timestamp='2021-08-10T14:39:37.427' details=':-1: running the test CRASHED with signal 11' flowId='Test.test_crash.test_fail' message='Test/test_crash.py:0 (test_fail)' name='Test.test_crash.test_fail']
This change ensures that a test which crashes is reported to TeamCity as failed.
When using PyTest with the
pytest-xdist
plugin and one of the--forked
,--boxed
or-n
options, tests will execute in Python subprocesses, which means individual tests can crash without crashing the main PyTest process. In case of a crash, thepytest_runtest_logreport
hook is called withreport.failed == True
andreport.when == '???'
(undocumented behaviour). This PR modifies the TeamCity PyTest plugin to handle this case.Example output: