Skip to content

Commit 6121584

Browse files
committed
set numprocesses
1 parent e25e457 commit 6121584

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/conftest.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
# Constants for testing with extra plugin arguments
44
_NO_ARGS = []
5-
_XDIST_ARGS = ["--numprocesses", "auto"]
5+
_XDIST_ZERO = ["--numprocesses", "0"]
6+
_XDIST_TWO = ["--numprocesses", "2"]
67

78

89
@pytest.fixture(
9-
params=[_NO_ARGS, _XDIST_ARGS],
10-
ids=["no_plugin", "with_xdist"],
10+
params=[_NO_ARGS, _XDIST_ZERO, _XDIST_TWO],
11+
ids=["no_plugin", "xdist_zero", "xdist_two"],
1112
)
1213
def plugin_args(request: pytest.FixtureRequest) -> list[str]:
1314
"""Fixture to test with various plugins"""
@@ -17,12 +18,13 @@ def plugin_args(request: pytest.FixtureRequest) -> list[str]:
1718
@pytest.fixture(
1819
params=[
1920
_NO_ARGS,
21+
_XDIST_ZERO,
2022
pytest.param(
21-
_XDIST_ARGS,
23+
_XDIST_TWO,
2224
marks=pytest.mark.xfail(reason="Not currently compatible with xdist"),
2325
),
2426
],
25-
ids=["no_plugin", "with_xdist"],
27+
ids=["no_plugin", "xdist_zero", "xdist_two"],
2628
)
2729
def plugin_args_fails_xdist(request: pytest.FixtureRequest) -> list[str]:
2830
"""Fixture to test with various plugins, but expected to fail xdist"""

0 commit comments

Comments
 (0)