Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
Labels
OS-wasitype-bugAn unexpected behavior, bug, or error
@treyhunner

Description

@treyhunner

Bug report

Use CPython compiled for WebAssembly and then importunittest.mock

Or visitthis 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 allowsunittest.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


      [8]ページ先頭

      ©2009-2025 Movatter.jp