MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_exec_single_mode

Function test_exec_single_mode

wasm/tests/test_exec_mode.py:9–21  ·  view source on GitHub ↗
(wdriver)

Source from the content-addressed store, hash-verified

7
8
9def test_exec_single_mode(wdriver):
10 assert wdriver.execute_script("return window.rp.pyExecSingle('1+1')") == 2
11 stdout = wdriver.execute_script(
12 """
13 let output = "";
14 save_output = function(text) {{
15 output += text
16 }};
17 window.rp.pyExecSingle('1+1\\n2+2',{stdout: save_output});
18 return output;
19 """
20 )
21 assert stdout == "2\n4\n"

Callers

nothing calls this directly

Calls 1

execute_scriptMethod · 0.80

Tested by

no test coverage detected