Closed joerick closed 1 year ago
I can reproduce this with pytest-parallel
This is fixed in pytest-nunit 1.0.2 I'll patch this library to use that update
{'setup-report': <TestReport 'tests/test_fail.py::test_fail' when='setup' outcome='passed'>, 'call-report': <TestReport 'tests/test_fail.py::test_fail' when='call' outcome='failed'>, 'teardown-report': None, 'idref': 100, 'path': 'tests/test_fail.py', 'properties': {'python-version': '3.10.0 (v3.10.0:b494f5935c, Oct 4 2021, 14:59:20) [Clang 12.0.5 (clang-1205.0.22.11)]', 'fspath': 'tests/test_fail.py'}, 'attachments': None, 'error': '[gw1] darwin -- Python 3.10.0 /Users/anthonyshaw/tmp/pytest_repro/.venv/bin/python\n\n def test_fail():\n> assert False\nE assert False\n\ntests/test_fail.py:2: AssertionError', 'stack-trace': '/Users/anthonyshaw/tmp/pytest_repro/tests/test_fail.py:2: assert False', 'name': 'tests/test_fail.py::test_fail', 'start': datetime.datetime(2022, 10, 20, 0, 47, 30, 864035)}
@joerick Bug is fixed in latest pytest-nunit
When I run pytest with both pytest-azurepipelines and pytest-xdist (for parallel builds), and a test fails, I get this error:
full traceback
```text Traceback (most recent call last): File "/Users/joerick/Library/Application Support/hatch/env/virtual/pytest-nunit-keyerror-iTJZd9Ui/pytest-nunit-keyerror/bin/pytest", line 10, inI was able to minimally recreate like this:
I wasn't sure if this should be filed at pytest-nunit or here, apologies if I got it wrong!