generated from tophat/new-project-kit
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests highlighting xdist incompatibilities
- Loading branch information
Showing
16 changed files
with
236 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import pytest | ||
|
||
# Constants for testing with extra plugin arguments | ||
_NO_ARGS = [] | ||
_XDIST_ZERO = ["--numprocesses", "0"] | ||
_XDIST_TWO = ["--numprocesses", "2"] | ||
|
||
|
||
@pytest.fixture( | ||
params=[_NO_ARGS, _XDIST_ZERO, _XDIST_TWO], | ||
ids=["no_plugin", "xdist_zero", "xdist_two"], | ||
) | ||
def plugin_args(request: pytest.FixtureRequest) -> list[str]: | ||
"""Fixture to test with various plugins""" | ||
return request.param | ||
|
||
|
||
@pytest.fixture( | ||
params=[ | ||
_NO_ARGS, | ||
_XDIST_ZERO, | ||
pytest.param( | ||
_XDIST_TWO, | ||
marks=pytest.mark.xfail(reason="Not currently compatible with xdist"), | ||
), | ||
], | ||
ids=["no_plugin", "xdist_zero", "xdist_two"], | ||
) | ||
def plugin_args_fails_xdist(request: pytest.FixtureRequest) -> list[str]: | ||
"""Fixture to test with various plugins, but expected to fail xdist""" | ||
return request.param |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.