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

Provide methods to save and restore state of the global ETSConfig #1734

Open
mdickinson opened this issue Feb 27, 2023 · 1 comment
Open

Comments

@mdickinson
Copy link
Member

For testing purposes, it's often convenient to make temporary changes to the state of the global ETSConfig object and then undo those changes in the test cleanup. This generally involves digging into the ETSConfig internals.

This could be made easier and less fragile with the addition of getstate and setstate methods on ETSConfig. (Or possibly a state property that's readable and writeable.)

@mdickinson
Copy link
Member Author

We could even provide a context manager that saves and restores state, similar in spirit to something like warnings.catch_warnings.

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

No branches or pull requests

1 participant