Quansight-Labs / pytest-run-parallel

A simple pytest plugin to run tests concurrently
MIT License
6 stars 2 forks source link

Ensure that pytest.mark.skipif works #15

Closed andfoy closed 2 weeks ago

andfoy commented 2 weeks ago

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.