We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When importing unittest.mock, an exception is raised due to unittest.mock importing asyncio.
unittest.mock
asyncio
It seems the asyncio library is only used in unittest.mock when mocking async functions.
I believe delaying the import of asyncio until the moment it's needed would make unittest.mock functional for most use cases on WASM builds.
A demonstration of the error: https://www.pythonmorsels.com/r/35fv2/
CPython 3.11.0rc1 built with Emscripten for the web browser
The text was updated successfully, but these errors were encountered:
Duplicate of #96883. I accidentally opened this issue twice.
Sorry, something went wrong.
No branches or pull requests
Bug report
When importing
unittest.mock
, an exception is raised due tounittest.mock
importingasyncio
.It seems the
asyncio
library is only used inunittest.mock
when mocking async functions.I believe delaying the import of
asyncio
until the moment it's needed would makeunittest.mock
functional for most use cases on WASM builds.A demonstration of the error: https://www.pythonmorsels.com/r/35fv2/
Your environment
CPython 3.11.0rc1 built with Emscripten for the web browser
The text was updated successfully, but these errors were encountered: