Skip to content

Commit 97f275f

Browse files
committed
Rename for xdist compatibility
Fixes #305
1 parent bc92da6 commit 97f275f

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

CHANGES.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Release Notes
77

88
* Thanks to `@p00j4 <https://github.com/p00j4>`_ and `@anothermattbrown <https://github.com/anothermattbrown>`_ for reporting and `@christiansandberg <https://github.com/christiansandberg>`_ and `@superdodd <https://github.com/superdodd>`_ and `@dhalperi <https://github.com/dhalperi>`_ for the fix
99

10+
* Fix attribute name for compatibility with ``pytest-xdist`` 2. (`#305 <https://github.com/pytest-dev/pytest-html/issues/305>`_)
11+
12+
* Thanks to `@Zac-HD <https://github.com/Zac-HD>`_ for the fix
13+
1014
**2.1.1 (2020-03-18)**
1115

1216
* Fix issue with funcargs causing failures. (`#282 <https://github.com/pytest-dev/pytest-html/issues/282>`_)
@@ -264,7 +268,7 @@ Release Notes
264268

265269
**1.7 (2015-10-19)**
266270

267-
* Fixed INTERNALERROR when an xdist slave crashes
271+
* Fixed INTERNALERROR when an xdist worker crashes
268272
(`@The-Compiler <https://github.com/The-Compiler>`_)
269273
* Added report sections including stdout and stderr to log
270274

pytest_html/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ def pytest_configure(config):
7777
for csspath in config.getoption("css"):
7878
if not os.path.exists(csspath):
7979
raise IOError(f"No such file or directory: '{csspath}'")
80-
if not hasattr(config, "slaveinput"):
81-
# prevent opening htmlpath on slave nodes (xdist)
80+
if not hasattr(config, "workerinput"):
81+
# prevent opening htmlpath on worker nodes (xdist)
8282
config._html = HTMLReport(htmlpath, config)
8383
config.pluginmanager.register(config._html)
8484

testing/test_pytest_html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ def pytest_configure(config):
774774
assert "Environment" in html
775775
assert len(re.findall("ZZZ.+AAA", html, re.DOTALL)) == 1
776776

777-
def test_xdist_crashing_slave(self, testdir):
777+
def test_xdist_crashing_worker(self, testdir):
778778
"""https://github.com/pytest-dev/pytest-html/issues/21"""
779779
testdir.makepyfile(
780780
"""

0 commit comments

Comments
 (0)