Skip to content

Commit 3a47004

Browse files
authored
Merge branch 'master' into rm-3.4
2 parents 69d98fb + 6fd5b56 commit 3a47004

File tree

6 files changed

+75
-37
lines changed

6 files changed

+75
-37
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ environment:
99
- TOXENV: "py38-pytestfeatures"
1010

1111
install:
12-
- C:\Python38\python -m pip install -U pip setuptools
12+
- C:\Python38\python -m pip install -U pip setuptools virtualenv
1313
- C:\Python38\python -m pip install -U tox setuptools_scm
1414

1515
build: false # Not a C# project, build stuff at the test step instead.

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ repos:
2121
files: ^(CHANGELOG.rst|HOWTORELEASE.rst|README.rst|changelog/.*)$
2222
language: python
2323
additional_dependencies: [pygments, restructuredtext_lint]
24+
language_version: python3.7

CHANGELOG.rst

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1+
pytest-xdist 1.31.0 (2019-12-19)
2+
================================
3+
4+
Features
5+
--------
6+
7+
- `#486 <https://github.com/pytest-dev/pytest-xdist/issues/486>`_: Add support for Python 3.8.
8+
9+
10+
Bug Fixes
11+
---------
12+
13+
- `#491 <https://github.com/pytest-dev/pytest-xdist/issues/491>`_: Fix regression that caused custom plugin command-line arguments to be discarded when using ``--tx`` mode.
14+
15+
16+
17+
pytest-xdist 1.30.0 (2019-10-01)
18+
================================
19+
20+
Features
21+
--------
22+
23+
- `#448 <https://github.com/pytest-dev/pytest-xdist/issues/448>`_: Initialization between workers and master nodes is now more consistent, which fixes a number of
24+
long-standing issues related to startup with the ``-c`` option.
25+
26+
Issues:
27+
28+
* `#6 <https://github.com/pytest-dev/pytest-xdist/issues/6>`__: Poor interaction between ``-n#`` and ``-c X.cfg``
29+
* `#445 <https://github.com/pytest-dev/pytest-xdist/issues/445>`__: pytest-xdist is not reporting the same nodeid as pytest does
30+
31+
This however only works with **pytest 5.1 or later**, as it required changes in pytest itself.
32+
33+
34+
Bug Fixes
35+
---------
36+
37+
- `#467 <https://github.com/pytest-dev/pytest-xdist/issues/467>`_: Fix crash issues related to running xdist with the terminal plugin disabled.
38+
39+
140
pytest-xdist 1.29.0 (2019-06-14)
241
================================
342

@@ -401,39 +440,6 @@ Improved Documentation
401440
- Added ``HOWTORELEASE`` documentation. (#155)
402441

403442

404-
..
405-
You should *NOT* be adding new change log entries to this file, this
406-
file is managed by towncrier. You *may* edit previous change logs to
407-
fix problems like typo corrections or such.
408-
To add a new change log entry, please see
409-
https://pip.pypa.io/en/latest/development/#adding-a-news-entry
410-
We named the news folder ``changelog``
411-
412-
.. towncrier release notes start
413-
414-
pytest-xdist 1.30.0 (2019-10-01)
415-
================================
416-
417-
Features
418-
--------
419-
420-
- `#448 <https://github.com/pytest-dev/pytest-xdist/issues/448>`_: Initialization between workers and master nodes is now more consistent, which fixes a number of
421-
long-standing issues related to startup with the ``-c`` option.
422-
423-
Issues:
424-
425-
* `#6 <https://github.com/pytest-dev/pytest-xdist/issues/6>`__: Poor interaction between ``-n#`` and ``-c X.cfg``
426-
* `#445 <https://github.com/pytest-dev/pytest-xdist/issues/445>`__: pytest-xdist is not reporting the same nodeid as pytest does
427-
428-
This however only works with **pytest 5.1 or later**, as it required changes in pytest itself.
429-
430-
431-
Bug Fixes
432-
---------
433-
434-
- `#467 <https://github.com/pytest-dev/pytest-xdist/issues/467>`_: Fix crash issues related to running xdist with the terminal plugin disabled.
435-
436-
437443
1.17.0
438444
------
439445

changelog/486.feature

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/xdist/workermanage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def make_reltoroot(roots, args):
190190
parts = arg.split(splitcode)
191191
fspath = py.path.local(parts[0])
192192
if not fspath.exists():
193+
result.append(arg)
193194
continue
194195
for root in roots:
195196
x = fspath.relto(root)

testing/acceptance_test.py

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,46 @@ def test_crash():
186186
)
187187
assert result.ret == 1
188188

189-
def test_distribution_rsyncdirs_example(self, testdir):
189+
def test_distribution_rsyncdirs_example(self, testdir, monkeypatch):
190+
# use a custom plugin that has a custom command-line option to ensure
191+
# this is propagated to workers (see #491)
192+
testdir.makepyfile(
193+
**{
194+
"myplugin/src/foobarplugin.py": """
195+
from __future__ import print_function
196+
197+
import os
198+
import sys
199+
import pytest
200+
201+
def pytest_addoption(parser):
202+
parser.addoption("--foobar", action="store", dest="foobar_opt")
203+
204+
@pytest.mark.tryfirst
205+
def pytest_load_initial_conftests(early_config):
206+
opt = early_config.known_args_namespace.foobar_opt
207+
print("--foobar=%s active! [%s]" % (opt, os.getpid()), file=sys.stderr)
208+
"""
209+
}
210+
)
211+
assert (testdir.tmpdir / "myplugin/src/foobarplugin.py").check(file=1)
212+
monkeypatch.setenv(
213+
"PYTHONPATH", str(testdir.tmpdir / "myplugin/src"), prepend=os.pathsep
214+
)
215+
190216
source = testdir.mkdir("source")
191217
dest = testdir.mkdir("dest")
192218
subdir = source.mkdir("example_pkg")
193219
subdir.ensure("__init__.py")
194220
p = subdir.join("test_one.py")
195221
p.write("def test_5():\n assert not __file__.startswith(%r)" % str(p))
196-
result = testdir.runpytest(
222+
result = testdir.runpytest_subprocess(
197223
"-v",
198224
"-d",
225+
"-s",
226+
"-pfoobarplugin",
227+
"--foobar=123",
228+
"--dist=load",
199229
"--rsyncdir=%(subdir)s" % locals(),
200230
"--tx=popen//chdir=%(dest)s" % locals(),
201231
p,
@@ -209,6 +239,7 @@ def test_distribution_rsyncdirs_example(self, testdir):
209239
"*1 passed*",
210240
]
211241
)
242+
result.stderr.fnmatch_lines(["--foobar=123 active! *"])
212243
assert dest.join(subdir.basename).check(dir=1)
213244

214245
def test_backward_compatibility_worker_terminology(self, testdir):

0 commit comments

Comments
 (0)