Skip to content

Commit b3085e1

Browse files
authored
Fix CI: pytest-xdist 2 and attrs
2 parents 33f4c62 + 5697479 commit b3085e1

23 files changed

+140
-55
lines changed

.builds/freebsd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ tasks:
2121
.venv/bin/tox --version
2222
cd pytest
2323
../.venv/bin/tox --notest -v
24+
.tox/py37-coverage-xdist/bin/pip --version
25+
.tox/py37-coverage-xdist/bin/pip freeze
2426
2527
- test: |
2628
cd pytest

.ci/report-coverage.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
set -ex
44

55
# Set --connect-timeout to work around https://github.com/curl/curl/issues/4461
6-
curl -S -L --connect-timeout 5 --retry 6 -s -o /tmp/codecov.sh \
7-
https://raw.githubusercontent.com/blueyed/codecov-bash/my-master/codecov
6+
curl -S -L --connect-timeout 5 --retry 6 -s -o /tmp/codecov.sh https://codecov.io/bash
87

98
for _ in 1 2 3 4 5; do
109
bash /tmp/codecov.sh -Z -X fix -X s3 -f coverage.xml "$@" && break

changelog/7255.feature.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Introduced a new hook named `pytest_warning_recorded` to convey information about warnings captured by the internal `pytest` warnings plugin.
2+
3+
This hook is meant to replace `pytest_warning_captured`, which will be removed in a future release.

changelog/7356.trivial.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove last internal uses of deprecated "slave" term from old pytest-xdist.

doc/en/announce/release-2.3.5.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Changes between 2.3.4 and 2.3.5
4646
- Issue 265 - integrate nose setup/teardown with setupstate
4747
so it doesn't try to teardown if it did not setup
4848

49-
- issue 271 - don't write junitxml on slave nodes
49+
- issue 271 - don't write junitxml on worker nodes
5050

5151
- Issue 274 - don't try to show full doctest example
5252
when doctest does not know the example location

doc/en/announce/release-2.6.1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Changes 2.6.1
3232
purely the nodeid. The line number is still shown in failure reports.
3333
Thanks Floris Bruynooghe.
3434

35-
- fix issue437 where assertion rewriting could cause pytest-xdist slaves
35+
- fix issue437 where assertion rewriting could cause pytest-xdist worker nodes
3636
to collect different tests. Thanks Bruno Oliveira.
3737

3838
- fix issue555: add "errors" attribute to capture-streams to satisfy

doc/en/changelog.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5869,7 +5869,7 @@ time or change existing behaviors in order to make them less surprising/more use
58695869
purely the nodeid. The line number is still shown in failure reports.
58705870
Thanks Floris Bruynooghe.
58715871

5872-
- fix issue437 where assertion rewriting could cause pytest-xdist slaves
5872+
- fix issue437 where assertion rewriting could cause pytest-xdist worker nodes
58735873
to collect different tests. Thanks Bruno Oliveira.
58745874

58755875
- fix issue555: add "errors" attribute to capture-streams to satisfy
@@ -6416,7 +6416,7 @@ Bug fixes:
64166416
- Issue 265 - integrate nose setup/teardown with setupstate
64176417
so it doesn't try to teardown if it did not setup
64186418

6419-
- issue 271 - don't write junitxml on slave nodes
6419+
- issue 271 - don't write junitxml on worker nodes
64206420

64216421
- Issue 274 - don't try to show full doctest example
64226422
when doctest does not know the example location
@@ -7298,7 +7298,7 @@ Bug fixes:
72987298
- fix assert reinterpreation that sees a call containing "keyword=..."
72997299

73007300
- fix issue66: invoke pytest_sessionstart and pytest_sessionfinish
7301-
hooks on slaves during dist-testing, report module/session teardown
7301+
hooks on worker nodes during dist-testing, report module/session teardown
73027302
hooks correctly.
73037303

73047304
- fix issue65: properly handle dist-testing if no

doc/en/funcarg_compare.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ several problems:
170170

171171
1. in distributed testing the master process would setup test resources
172172
that are never needed because it only co-ordinates the test run
173-
activities of the slave processes.
173+
activities of the worker processes.
174174

175175
2. if you only perform a collection (with "--collect-only")
176176
resource-setup will still be executed.

doc/en/reference.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ Session related reporting hooks:
710710
.. autofunction:: pytest_fixture_setup
711711
.. autofunction:: pytest_fixture_post_finalizer
712712
.. autofunction:: pytest_warning_captured
713+
.. autofunction:: pytest_warning_recorded
713714

714715
Central hook for reporting about test execution:
715716

src/_pytest/cacheprovider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def pytest_collection_modifyitems(
344344

345345
def pytest_sessionfinish(self, session):
346346
config = self.config
347-
if config.getoption("cacheshow") or hasattr(config, "slaveinput"):
347+
if config.getoption("cacheshow") or hasattr(config, "workerinput"):
348348
return
349349

350350
saved_lastfailed = config.cache.get("cache/lastfailed", {})
@@ -390,7 +390,7 @@ def _get_increasing_order(self, items):
390390

391391
def pytest_sessionfinish(self) -> None:
392392
config = self.config
393-
if config.getoption("cacheshow") or hasattr(config, "slaveinput"):
393+
if config.getoption("cacheshow") or hasattr(config, "workerinput"):
394394
return
395395
if config.getoption("collectonly"):
396396
return

0 commit comments

Comments
 (0)