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

Introducing an autouse fixture to (re)set config options for all tests. #6498

Closed
hendrikmakait opened this issue Jun 3, 2022 · 1 comment
Assignees

Comments

@hendrikmakait
Copy link
Member

hendrikmakait commented Jun 3, 2022

In #6075, we deactivated profiling for a number of tests using the _reconfigure() context manager. In the same function, we also set other config options. I think that we would benefit from having a means of (re)setting config options globally.

For this purpose, I propose an autouse fixture that (re)sets config options for all tests, which could be _reconfigure().

I am open to alternative ways of setting config options for all tests.

@hendrikmakait
Copy link
Member Author

hendrikmakait commented Aug 3, 2022

As @gjoseph92 discovered in #6731 (comment), _reconfigure in its current state introduces flakiness in our CI pipeline. After an offline discussion with @graingert, we decided that instead of implicitly disabling profiling for tests which import our autouse fixture, it would be preferable to issue a warning whenever profiling is running in a test (#6819). In light of #6806, this would have the benefit that it also applies to tests that do not import the fixture and alert those users that they likely want to deactivate profiling for their tests.

lf the need arises for other config options to be set for all tests, we can revisit introducing some autouse fixture but for now I am closing this as the main purpose would have been to deactivate profiling.

@hendrikmakait hendrikmakait closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2022
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 a pull request may close this issue.

1 participant