Skip to content
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

Ensure that pytest.mark.skipif works #15

Merged
merged 2 commits into from
Nov 6, 2024
Merged

Ensure that pytest.mark.skipif works #15

merged 2 commits into from
Nov 6, 2024

Conversation

andfoy
Copy link
Member

@andfoy andfoy commented Nov 6, 2024

Fixes #13

pytest.mark.skipif relies on the __globals__ dictionary of the original test function. Given that pytest-run-parallel wraps such function from another scope, modules and variables present on the original test function scoped were dropped, preventing the decorator from working. The changes in this PR ensure that the variables defined on the original scoped are copied over the new one.

@andfoy andfoy requested a review from lysnikolaou November 6, 2024 22:16
@andfoy andfoy merged commit 1ea2c91 into main Nov 6, 2024
9 checks passed
@andfoy andfoy deleted the fix_skipif_decorator branch November 6, 2024 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--run-parallel doesn't work well with old style @pytest.mark.skipif("expr")
1 participant