You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running py.test test_version.py, we see that the test is running with Invoke 0.12.2:
============================ test session starts =============================
platform darwin -- Python 2.7.10, pytest-2.9.2, py-1.4.31, pluggy-0.3.1
rootdir: /Users/jcruy/Desktop/xdist_bug, inifile:
plugins: xdist-1.14
collected 1 items
test_version.py F
================================== FAILURES ==================================
________________________________ test_version ________________________________
def test_version():
> assert False, str(invoke.__version__)
E AssertionError: 0.12.2
E assert False
test_version.py:5: AssertionError
========================== 1 failed in 0.09 seconds ==========================
However, when running it with xdist (py.test test_version.py -n 2), we see that the test is running with Invoke 0.11.0:
============================ test session starts =============================
platform darwin -- Python 2.7.10, pytest-2.9.2, py-1.4.31, pluggy-0.3.1
rootdir: /Users/jcruy/Desktop/xdist_bug, inifile:
plugins: xdist-1.14
gw0 [1] / gw1 [1]
scheduling tests via LoadScheduling
F
================================== FAILURES ==================================
________________________________ test_version ________________________________
[gw1] darwin -- Python 2.7.10 /Users/jcruy/Desktop/xdist_bug/ENV/bin/python
def test_version():
> assert False, str(invoke.__version__)
E AssertionError: 0.11.0
E assert False
test_version.py:5: AssertionError
========================== 1 failed in 0.45 seconds ==========================
Notes:
I chose the Invoke package for example's sake only, it happens with other packages as well.
I know that it's not a really good thing to install two versions of a packages in the same environment, but I believe that the behaviour between pytest and xdist should at least be consistent.
I would gladly contribute to a fix, if you point me to the area of the code which might be responsible for that.
Environment:
OS X 10.11.4
Python 2.7.10
pytest 2.9.2
pytest-xdist 1.14
The text was updated successfully, but these errors were encountered:
When installing two different versions of a package in the same environment,
xdist
doesn't pick the same version as regularpytest
.Steps to reproduce using Invoke package for instance:
Download the source of Invoke 0.12.2 and install it with
python setup.py install
.I have a dummy test file
test_version.py
, containing:When running
py.test test_version.py
, we see that the test is running with Invoke 0.12.2:However, when running it with
xdist
(py.test test_version.py -n 2
), we see that the test is running with Invoke 0.11.0:Notes:
pytest
andxdist
should at least be consistent.Environment:
The text was updated successfully, but these errors were encountered: