-
-
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 test module for run_in_pyodide functions #133
base: main
Are you sure you want to change the base?
Conversation
This makes name resolution a bit nicer. If we define a class A in the test, 1. A.__module__ is no longer "builtins" 2. sys.modules[A.__module__] points back to our current global scope 3. __file__ now has the correct value
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.
Thanks! Do you have some idea about the test failure?
Not yet. Locally the test passes if I do
but if I pass |
But it looks like it's failing for an unrelated reason and the |
Seems like there was some change in pytest 8.0.0. When I downgrade pytest version to <8.0.0, the failing test passes. I suspect some of the modifications we do at private attributes doesn't work anymore. |
Okay, let's cap Pytest <8 and I'll look into fixing it in a followup. |
Sounds good to me. Probably we should find a way to not use |
This fixes some reflection tools. If we define a class A in the test,
A.__module__
is no longer"builtins"
sys.modules[A.__module__].__dict__
points back to our current global scope__file__
now has the correct value