Skip to content

Rename "slave" -> "worker" for xdist compatibility #307

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

Merged
merged 1 commit into from
Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Release Notes

* 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

* Fix attribute name for compatibility with ``pytest-xdist`` 2. (`#305 <https://github.com/pytest-dev/pytest-html/issues/305>`_)

* Thanks to `@Zac-HD <https://github.com/Zac-HD>`_ for the fix
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See, that's what I want to see for base-url as well 😉


**2.1.1 (2020-03-18)**

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

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

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

Expand Down
4 changes: 2 additions & 2 deletions pytest_html/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def pytest_configure(config):
for csspath in config.getoption("css"):
if not os.path.exists(csspath):
raise IOError(f"No such file or directory: '{csspath}'")
if not hasattr(config, "slaveinput"):
# prevent opening htmlpath on slave nodes (xdist)
if not hasattr(config, "workerinput"):
# prevent opening htmlpath on worker nodes (xdist)
config._html = HTMLReport(htmlpath, config)
config.pluginmanager.register(config._html)

Expand Down
2 changes: 1 addition & 1 deletion testing/test_pytest_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ def pytest_configure(config):
assert "Environment" in html
assert len(re.findall("ZZZ.+AAA", html, re.DOTALL)) == 1

def test_xdist_crashing_slave(self, testdir):
def test_xdist_crashing_worker(self, testdir):
"""https://github.com/pytest-dev/pytest-html/issues/21"""
testdir.makepyfile(
"""
Expand Down