10BC0 Rename "slave" -> "worker" for xdist compatibility by Zac-HD · Pull Request #307 · pytest-dev/pytest-html · GitHub
[go: up one dir, main page]

Skip to content
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
31B1
0