Skip to content

Junit output is incorrect when run with xdist plugin #1066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
acloyd opened this issue Sep 25, 2015 · 3 comments
Closed

Junit output is incorrect when run with xdist plugin #1066

acloyd opened this issue Sep 25, 2015 · 3 comments

Comments

@acloyd
Copy link

acloyd commented Sep 25, 2015

When running a set of tests using xdist, the junit output file is not correct. Sometimes failures are printed in the wrong test. The times for how long the tests take also get messed up. This does not happen using pytest-2.7.3

Installed python modules:

pip freeze
apipkg==1.4
configobj==5.0.6
execnet==1.4.1
py==1.4.30
pytest==2.8.0
pytest-xdist==1.13.1
requests==2.7.0
six==1.9.0
wheel==0.24.0

Example test file that causes the failure. In this example, the output junit file shows that test_B_1 fails even though it as A_1 that failed.

import time
import pytest


def test_A_1(request):
    time.sleep(6)
    assert False

def test_A_2(request):
    return

def test_B_1(request):
    time.sleep(20)
    return

def test_B_2(request):
    return

Command to run:

py.test --junitxml=/tmp/out.xml -n 2

Mac OS 10.5.5

@nicoddemus
Copy link
Member

Thanks for the report! I'm closing this though as it is the same as #1064.

@acloyd
Copy link
Author

acloyd commented Sep 25, 2015

Ya, sorry. I searched yesterday, but wrote it today.

@nicoddemus
Copy link
Member

No worries, thanks for taking the time to write an come up with an example!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants