-
Notifications
You must be signed in to change notification settings - Fork 42
test: Add tests highlighting xdist incompatibilities #902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4c6d3e7
Add tests highlighting xdist incompatibilities
epenet 5af0e7b
chore: py3.8 compatible
noahnu 3ad859d
Merge branch 'main' into 20241017-1303
noahnu ac509e5
Remove plugin_args_fails_xdist to fix 3.8 compatibility
epenet 0e727da
Remove plugin_args to fix windows compatibility
epenet a7223f2
Mark tests as flaky
epenet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,33 @@ | ||
from typing import List | ||
|
||
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The xfail here is because the test is flakey, haven't figured out why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've put the flaky markers back in.
Until my PR is merged, the workflow has to be triggered manually :( but hopefully once my first PR is in I can tweak more easily...