Content-Length: 274221 | pFad | https://github.com/python/cpython/issues/96883

78 unittest.mock does not work on WebAssembly build of CPython · Issue #96883 · python/cpython · GitHub
Skip to content

unittest.mock does not work on WebAssembly build of CPython #96883

@treyhunner

Description

@treyhunner

Bug report

Use CPython compiled for WebAssembly and then import unittest.mock

Or visit this page and click the "Run in Browser" button to see the error.

The error shown is:

Traceback (most recent call last):
  File "//__main__.py", line 2, in <module>
    import unittest.mock
  File "/home/runner/work/cpython-wasm-test/cpython-wasm-test/cpython/Lib/unittest/mock.py", line 26, in <module>
  File "/home/runner/work/cpython-wasm-test/cpython-wasm-test/cpython/Lib/asyncio/__init__.py", line 8, in <module>
  File "/home/runner/work/cpython-wasm-test/cpython-wasm-test/cpython/Lib/asyncio/base_events.py", line 18, in <module>
ModuleNotFoundError: No module named 'concurrent'

This error seems to only occur on the WebAssembly build for the browser (the Node build allows unittest.mock to be imported as expected).

Your environment

  • CPython versions tested on: 3.11.0rc2
  • Operating system and architecture: WebAssembly

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-wasitype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/96883

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy