Skip to content

Commit 8d43489

Browse files
committed
Fix tests for pytest-xdist 3.3.0
1 parent 5bc0a56 commit 8d43489

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/test_subtests.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def test_simple_terminal_normal(self, simple_script, testdir, mode):
2929
else:
3030
pytest.importorskip("xdist")
3131
result = testdir.runpytest("-n1")
32-
expected_lines = ["gw0 [1]"]
32+
expected_lines = ["1 worker [1 item]"]
3333

3434
expected_lines += [
3535
"* test_foo [[]custom[]] (i=1) *",
@@ -54,7 +54,7 @@ def test_simple_terminal_verbose(self, simple_script, testdir, mode):
5454
pytest.importorskip("xdist")
5555
result = testdir.runpytest("-n1", "-v")
5656
expected_lines = [
57-
"gw0 [1]",
57+
"1 worker [1 item]",
5858
"*gw0*100%* test_simple_terminal_verbose.py::test_foo*",
5959
"*gw0*100%* test_simple_terminal_verbose.py::test_foo*",
6060
"*gw0*100%* test_simple_terminal_verbose.py::test_foo*",
@@ -87,7 +87,7 @@ def test_foo(subtests):
8787
else:
8888
pytest.importorskip("xdist")
8989
result = testdir.runpytest("-n1")
90-
expected_lines = ["gw0 [1]"]
90+
expected_lines = ["1 worker [1 item]"]
9191
expected_lines += ["* 1 passed, 3 skipped, 2 subtests passed in *"]
9292
result.stdout.fnmatch_lines(expected_lines)
9393

@@ -108,7 +108,7 @@ def test_foo(subtests):
108108
else:
109109
pytest.importorskip("xdist")
110110
result = testdir.runpytest("-n1")
111-
expected_lines = ["gw0 [1]"]
111+
expected_lines = ["1 worker [1 item]"]
112112
expected_lines += ["* 1 passed, 3 xfailed, 2 subtests passed in *"]
113113
result.stdout.fnmatch_lines(expected_lines)
114114

@@ -159,7 +159,7 @@ def test_simple_terminal_normal(self, simple_script, testdir, runner):
159159
else:
160160
pytest.importorskip("xdist")
161161
result = testdir.runpytest(simple_script, "-n1")
162-
expected_lines = ["gw0 [1]"]
162+
expected_lines = ["1 worker [1 item]"]
163163
result.stdout.fnmatch_lines(
164164
expected_lines
165165
+ [
@@ -201,7 +201,7 @@ def test_simple_terminal_verbose(self, simple_script, testdir, runner):
201201
pytest.importorskip("xdist")
202202
result = testdir.runpytest(simple_script, "-n1", "-v")
203203
expected_lines = [
204-
"gw0 [1]",
204+
"1 worker [1 item]",
205205
"*gw0*100%* SUBFAIL test_simple_terminal_verbose.py::T::test_foo*",
206206
"*gw0*100%* SUBFAIL test_simple_terminal_verbose.py::T::test_foo*",
207207
"*gw0*100%* PASSED test_simple_terminal_verbose.py::T::test_foo*",

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ passenv =
88
TRAVIS
99
PYTEST_ADDOPTS
1010
deps =
11-
pytest-xdist>=1.28
11+
pytest-xdist>=3.3.0
1212

1313
commands =
1414
pytest {posargs:tests}

0 commit comments

Comments
 (0)