Merge remote-tracking branch 'upstream/master' into Corni/loadfilescope
This commit is contained in:
@@ -12,7 +12,6 @@ notifications:
|
|||||||
- pytest-commit@python.org
|
- pytest-commit@python.org
|
||||||
|
|
||||||
python:
|
python:
|
||||||
- '2.6'
|
|
||||||
- '2.7'
|
- '2.7'
|
||||||
- '3.4'
|
- '3.4'
|
||||||
- '3.5'
|
- '3.5'
|
||||||
@@ -21,6 +20,7 @@ env:
|
|||||||
- TOXENV=py-pytest30
|
- TOXENV=py-pytest30
|
||||||
- TOXENV=py-pytest31
|
- TOXENV=py-pytest31
|
||||||
- TOXENV=py-pytest32
|
- TOXENV=py-pytest32
|
||||||
|
- TOXENV=py-pytest33
|
||||||
|
|
||||||
install: pip install tox setuptools_scm
|
install: pip install tox setuptools_scm
|
||||||
script: tox
|
script: tox
|
||||||
|
|||||||
10
README.rst
10
README.rst
@@ -1,15 +1,23 @@
|
|||||||
|
|
||||||
|
|
||||||
.. image:: http://img.shields.io/pypi/v/pytest-xdist.svg
|
.. image:: http://img.shields.io/pypi/v/pytest-xdist.svg
|
||||||
|
:alt: PyPI version
|
||||||
|
:target: https://pypi.python.org/pypi/pytest-xdist
|
||||||
|
|
||||||
|
.. image:: https://img.shields.io/pypi/pyversions/pytest-xdist.svg
|
||||||
|
:alt: Python versions
|
||||||
:target: https://pypi.python.org/pypi/pytest-xdist
|
:target: https://pypi.python.org/pypi/pytest-xdist
|
||||||
|
|
||||||
.. image:: https://anaconda.org/conda-forge/pytest-xdist/badges/version.svg
|
.. image:: https://anaconda.org/conda-forge/pytest-xdist/badges/version.svg
|
||||||
|
:alt: Anaconda version
|
||||||
:target: https://anaconda.org/conda-forge/pytest-xdist
|
:target: https://anaconda.org/conda-forge/pytest-xdist
|
||||||
|
|
||||||
.. image:: https://travis-ci.org/pytest-dev/pytest-xdist.svg?branch=master
|
.. image:: https://travis-ci.org/pytest-dev/pytest-xdist.svg?branch=master
|
||||||
|
:alt: Travis CI build status
|
||||||
:target: https://travis-ci.org/pytest-dev/pytest-xdist
|
:target: https://travis-ci.org/pytest-dev/pytest-xdist
|
||||||
|
|
||||||
.. image:: https://ci.appveyor.com/api/projects/status/56eq1a1avd4sdd7e/branch/master?svg=true
|
.. image:: https://ci.appveyor.com/api/projects/status/56eq1a1avd4sdd7e/branch/master?svg=true
|
||||||
|
:alt: AppVeyor build status
|
||||||
:target: https://ci.appveyor.com/project/pytestbot/pytest-xdist
|
:target: https://ci.appveyor.com/project/pytestbot/pytest-xdist
|
||||||
|
|
||||||
xdist: pytest distributed testing plugin
|
xdist: pytest distributed testing plugin
|
||||||
@@ -229,7 +237,7 @@ You can also add default environments like this:
|
|||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
[pytest]
|
[pytest]
|
||||||
addopts = --tx ssh=myhost//python=python2.5 --tx ssh=myhost//python=python2.6
|
addopts = --tx ssh=myhost//python=python2.5 --tx ssh=myhost//python=python3.6
|
||||||
|
|
||||||
and then just type::
|
and then just type::
|
||||||
|
|
||||||
|
|||||||
13
appveyor.yml
13
appveyor.yml
@@ -1,13 +1,12 @@
|
|||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
# note: please use "tox --listenvs" to populate the build matrix
|
# note: please use "tox --listenvs" to populate the build matrix
|
||||||
- TOXENV: "py26-pytest30"
|
- TOXENV: "py27-pytest33"
|
||||||
- TOXENV: "py27-pytest30"
|
- TOXENV: "py34-pytest33"
|
||||||
- TOXENV: "py34-pytest30"
|
- TOXENV: "py35-pytest33"
|
||||||
- TOXENV: "py35-pytest30"
|
- TOXENV: "py36-pytest33"
|
||||||
- TOXENV: "py36-pytest30"
|
- TOXENV: "py27-pytest33-pexpect"
|
||||||
- TOXENV: "py27-pytest30-pexpect"
|
- TOXENV: "py36-pytest33-pexpect"
|
||||||
- TOXENV: "py35-pytest30-pexpect"
|
|
||||||
- TOXENV: "flakes"
|
- TOXENV: "flakes"
|
||||||
- TOXENV: "readme"
|
- TOXENV: "readme"
|
||||||
|
|
||||||
|
|||||||
1
changelog/259.removal
Normal file
1
changelog/259.removal
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Drop support for EOL Python 2.6.
|
||||||
11
setup.py
11
setup.py
@@ -1,12 +1,7 @@
|
|||||||
from sys import version_info
|
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
install_requires = ['execnet>=1.1', 'pytest>=3.0.0', 'pytest-forked']
|
install_requires = ['execnet>=1.1', 'pytest>=3.0.0', 'pytest-forked']
|
||||||
|
|
||||||
if version_info < (2, 7):
|
|
||||||
install_requires.append('ordereddict')
|
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pytest-xdist",
|
name="pytest-xdist",
|
||||||
@@ -27,6 +22,7 @@ setup(
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
|
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
|
||||||
install_requires=install_requires,
|
install_requires=install_requires,
|
||||||
setup_requires=['setuptools_scm'],
|
setup_requires=['setuptools_scm'],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
@@ -41,6 +37,11 @@ setup(
|
|||||||
'Topic :: Software Development :: Quality Assurance',
|
'Topic :: Software Development :: Quality Assurance',
|
||||||
'Topic :: Utilities',
|
'Topic :: Utilities',
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
|
'Programming Language :: Python :: 2',
|
||||||
|
'Programming Language :: Python :: 2.7',
|
||||||
'Programming Language :: Python :: 3',
|
'Programming Language :: Python :: 3',
|
||||||
|
'Programming Language :: Python :: 3.4',
|
||||||
|
'Programming Language :: Python :: 3.5',
|
||||||
|
'Programming Language :: Python :: 3.6',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -755,9 +755,9 @@ def test_worker_id_fixture(testdir, n):
|
|||||||
with open(fname) as f:
|
with open(fname) as f:
|
||||||
worker_ids.add(f.read().strip())
|
worker_ids.add(f.read().strip())
|
||||||
if n == 0:
|
if n == 0:
|
||||||
assert worker_ids == set(['master'])
|
assert worker_ids == {'master'}
|
||||||
else:
|
else:
|
||||||
assert worker_ids == set(['gw0', 'gw1'])
|
assert worker_ids == {'gw0', 'gw1'}
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('tb',
|
@pytest.mark.parametrize('tb',
|
||||||
@@ -915,7 +915,13 @@ def parse_tests_and_workers_from_output(lines):
|
|||||||
result = []
|
result = []
|
||||||
for line in lines:
|
for line in lines:
|
||||||
# example match: "[gw0] PASSED test_a.py::test[7]"
|
# example match: "[gw0] PASSED test_a.py::test[7]"
|
||||||
m = re.match(r'\[(gw\d)\]\s(.*?)\s(.*::.*)', line.strip())
|
m = re.match(r'''
|
||||||
|
\[(gw\d)\] # worker
|
||||||
|
\s*
|
||||||
|
(?:\[\s*\d+%\])? # progress indicator (pytest >=3.3)
|
||||||
|
\s(.*?) # status string ("PASSED")
|
||||||
|
\s(.*::.*) # nodeid
|
||||||
|
''', line.strip(), re.VERBOSE)
|
||||||
if m:
|
if m:
|
||||||
worker, status, nodeid = m.groups()
|
worker, status, nodeid = m.groups()
|
||||||
result.append((worker, status, nodeid))
|
result.append((worker, status, nodeid))
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ def pytest_addoption(parser):
|
|||||||
parser.addoption('--gx',
|
parser.addoption('--gx',
|
||||||
action="append",
|
action="append",
|
||||||
dest="gspecs",
|
dest="gspecs",
|
||||||
help=("add a global test environment, XSpec-syntax. "))
|
help="add a global test environment, XSpec-syntax. ")
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class TestLoadScheduling:
|
|||||||
sched.add_node(MockNode())
|
sched.add_node(MockNode())
|
||||||
sched.add_node(MockNode())
|
sched.add_node(MockNode())
|
||||||
node1, node2 = sched.nodes
|
node1, node2 = sched.nodes
|
||||||
col = ["xyz"] * (6)
|
col = ["xyz"] * 6
|
||||||
sched.add_node_collection(node1, col)
|
sched.add_node_collection(node1, col)
|
||||||
sched.add_node_collection(node2, col)
|
sched.add_node_collection(node2, col)
|
||||||
sched.schedule()
|
sched.schedule()
|
||||||
|
|||||||
5
tox.ini
5
tox.ini
@@ -1,8 +1,8 @@
|
|||||||
[tox]
|
[tox]
|
||||||
# if you change the envlist, please update .travis.yml file as well
|
# if you change the envlist, please update .travis.yml file as well
|
||||||
envlist=
|
envlist=
|
||||||
py{26,27,34,35,36}-pytest{30,31,32}
|
py{27,34,35,36}-pytest{30,31,32,33}
|
||||||
py{27,36}-pytest{30,31,32}-pexpect
|
py{27,36}-pytest{30,31,32,33}-pexpect
|
||||||
py{27,36}-pytest{master,features}
|
py{27,36}-pytest{master,features}
|
||||||
flakes
|
flakes
|
||||||
readme
|
readme
|
||||||
@@ -18,6 +18,7 @@ deps =
|
|||||||
pytest30: pytest~=3.0.5
|
pytest30: pytest~=3.0.5
|
||||||
pytest31: pytest~=3.1.0
|
pytest31: pytest~=3.1.0
|
||||||
pytest32: pytest~=3.2.0
|
pytest32: pytest~=3.2.0
|
||||||
|
pytest33: pytest~=3.3.0
|
||||||
pytestmaster: git+https://github.com/pytest-dev/pytest.git@master
|
pytestmaster: git+https://github.com/pytest-dev/pytest.git@master
|
||||||
pytestfeatures: git+https://github.com/pytest-dev/pytest.git@features
|
pytestfeatures: git+https://github.com/pytest-dev/pytest.git@features
|
||||||
pexpect: pexpect
|
pexpect: pexpect
|
||||||
|
|||||||
@@ -178,10 +178,6 @@ def remote_initconfig(option_dict, args):
|
|||||||
|
|
||||||
if __name__ == '__channelexec__':
|
if __name__ == '__channelexec__':
|
||||||
channel = channel # noqa
|
channel = channel # noqa
|
||||||
# python3.2 is not concurrent import safe, so let's play it safe
|
|
||||||
# https://bitbucket.org/hpk42/pytest/issue/347/pytest-xdist-and-python-32
|
|
||||||
if sys.version_info[:2] == (3, 2):
|
|
||||||
os.environ["PYTHONDONTWRITEBYTECODE"] = "1"
|
|
||||||
slaveinput, args, option_dict = channel.receive()
|
slaveinput, args, option_dict = channel.receive()
|
||||||
importpath = os.getcwd()
|
importpath = os.getcwd()
|
||||||
sys.path.insert(0, importpath) # XXX only for remote situations
|
sys.path.insert(0, importpath) # XXX only for remote situations
|
||||||
|
|||||||
@@ -1,14 +1,9 @@
|
|||||||
try:
|
from collections import OrderedDict
|
||||||
from collections import OrderedDict
|
|
||||||
except ImportError:
|
|
||||||
# Support for Python 2.6
|
|
||||||
from ordereddict import OrderedDict
|
|
||||||
|
|
||||||
from py.log import Producer
|
|
||||||
from _pytest.runner import CollectReport
|
from _pytest.runner import CollectReport
|
||||||
|
from py.log import Producer
|
||||||
from xdist.slavemanage import parse_spec_config
|
|
||||||
from xdist.report import report_collection_diff
|
from xdist.report import report_collection_diff
|
||||||
|
from xdist.slavemanage import parse_spec_config
|
||||||
|
|
||||||
|
|
||||||
class LoadScopeScheduling:
|
class LoadScopeScheduling:
|
||||||
|
|||||||
Reference in New Issue
Block a user