-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
During testing of pytest-azurepipelines, which relies on pytest-nunit, it was found that if you have pytest-rerunfailures installed and use the reruns argument, then this plugin's self.nunit_xml.cases becomes empty, so the add attachment fixture raises a KeyError exception.
Minimal example:
def test_example(add_nunit_attachment):
add_nunit_attachment("test_minimal.py", "test attachment")And if you run this command:
pytest --nunit-xml=test-results.xml
then it will generate the report with attachment details as expected.
However, if you pip install pytest-rerunfailures, and then run:
pytest --nunit-xml=test-results.xml --reruns 0
then you get KeyError: 'test_minimal.py::test_example'
anastasia-vlasova-gmg
Metadata
Metadata
Assignees
Labels
No labels