-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Refactor threading layer priority tests to not use stdout/stderr #7749
Conversation
As title, this prevents output from e.g diagnostics being able to influence the outcome of the tests. Fixes numba#7458
Although the PR didn't touch this line, I would recommend to change:
into
Copying the entire environment is a bit dangerous. For tests, it is better to start with a clean slate to avoid whatever variables exist in the environment to leak into the test. May not become an issue in practice, but I believe it's prudent to make sure it really doesn't. |
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.
It looks great. A few minor things and it'll be good to go!
As title.
Agree, am happy to make this change whilst editing these tests. It was, however, the env copy that actually triggered and demonstrated the problem with these tests in the first place! |
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.
Thank you for the changes, looks good now!
Turns out that doing #7749 (comment) leads to:
on windows, probably because the sysroot is cleared. 1d7f47b puts back the copy of the env as it's likely the easiest way to obtain a suitable environment that doesn't require tracking required Python env vars. |
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.
OK, let's go with the original.
Refactor threading layer priority tests to not use stdout/stderr
Refactor threading layer priority tests to not use stdout/stderr
As title, this prevents output from e.g diagnostics being able to
influence the outcome of the tests.
Fixes #7458