Add a test module for run_in_pyodide functions#133
Add a test module for run_in_pyodide functions#133hoodmane wants to merge 2 commits intopyodide:mainfrom
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
ryanking13
left a comment
There was a problem hiding this comment.
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