MCPcopy
hub / github.com/pyodide/pyodide / test_register_non_extendable_jsmodule

Function test_register_non_extendable_jsmodule

src/tests/test_jsproxy.py:820–831  ·  view source on GitHub ↗
(selenium_standalone_refresh)

Source from the content-addressed store, hash-verified

818@pytest.mark.skip_pyproxy_check
819@run_in_pyodide
820def test_register_non_extendable_jsmodule(selenium_standalone_refresh):
821 from pyodide.code import run_js
822
823 run_js(
824 """
825 pyodide.registerJsModule("x", Object.preventExtensions({aaa: 2, bbb: 7}))
826 """
827 )
828
829 a = {} # type:ignore[var-annotated]
830 exec("from x import *", a)
831 assert set(a).issuperset({"aaa", "bbb"})
832
833
834@run_in_pyodide

Callers

nothing calls this directly

Calls 2

run_jsFunction · 0.90
setFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…