-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add a global manager for configuring runtimes #141
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…/pytest-pyodide into global-state-manager2
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.
I'm not really sure how much of a difference this makes, we had a global config before, now we still have one. I guess as a signal instead of "this is just a hack" it says "we thought about it and we think this is the right hack".
pytest_pyodide/config.py
Outdated
def set_flag(self, runtime: RUNTIMES, flags: list[str]): | ||
self.flags[runtime] = flags | ||
|
||
def get_flag(self, runtime: RUNTIMES) -> list[str]: |
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.
Wouldn't this be get_flags
/ set_flags
plural?
That is true, but at least we now provide a public API that is less likely to change. In the follow-up, I would like to put the values like |
This adds a global config manager for pytest-pyodide.
This is mostly for use in pyodide, where we already modify browser flags in conftest.py. This PR aims to provide a more stable and public API to modify them.