-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
type: bugproblem that needs to be addressedproblem that needs to be addressed
Milestone
Description
Using python 2.7.10, pytest 2.8.0 and pytest-xdist 1.13.1.
Testcase:
import pytest, time
@pytest.mark.parametrize('i', list(range(100)))
def test_x(i):
print(i)
time.sleep(i/300.0)
assert i != 42
Run with pytest -n 8 --junit-xml=junit.xml.
The output on the command line looks fine, showing the test_x[42] failure.
But look at the resulting junit.xml file: the failure appears in the wrong <testcase> node:
<testcase classname="test_x" file="test_x.py" line="2" name="test_x[54]" time="0.141129970551"><failure message="i = 42 [...]</failure><system-out>42
</system-out></testcase>
This causes test failures to be listed incorrectly in our Jenkins CI.
The other <system-out> nodes also appear in the wrong <testcase> nodes.
The bug disappears when downgrading pytest to 2.7.3.
martinlehoux
Metadata
Metadata
Assignees
Labels
type: bugproblem that needs to be addressedproblem that needs to be addressed