MCPcopy Create free account
hub / github.com/cloudpipe/cloudpickle / test_run_in_notebook

Function test_run_in_notebook

tests/cloudpickle_ipykernel_test.py:66–77  ·  view source on GitHub ↗
(code, expected)

Source from the content-addressed store, hash-verified

64
65])
66def test_run_in_notebook(code, expected):
67 code = textwrap.dedent(code)
68
69 t_start = time.time()
70 status, output, err = run_in_notebook(code, timeout=1)
71 duration = time.time() - t_start
72 assert status == expected, (
73 f"Unexpected status: {status}, output: {output}, err: {err}, duration: {duration}"
74 )
75 assert duration < 10, "Timeout not enforced properly"
76 if expected == "error":
77 assert "This is a test error" in err
78
79
80def test_deterministic_payload_for_dynamic_func_in_notebook():

Callers

nothing calls this directly

Calls 1

run_in_notebookFunction · 0.85

Tested by

no test coverage detected