MCPcopy
hub / github.com/jupytext/jupytext / test_pipe_nbconvert_execute_sync

Function test_pipe_nbconvert_execute_sync

tests/integration/cli/test_execute.py:45–70  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

43@pytest.mark.requires_nbconvert
44@pytest.mark.skip_on_windows
45def test_pipe_nbconvert_execute_sync(tmpdir):
46 tmp_ipynb = str(tmpdir.join("notebook.ipynb"))
47 tmp_py = str(tmpdir.join("notebook.py"))
48
49 with open(tmp_py, "w") as fp:
50 fp.write(
51 """1 + 2
52"""
53 )
54
55 jupytext(
56 args=[
57 tmp_py,
58 "--set-formats",
59 "py,ipynb",
60 "--sync",
61 "--pipe-fmt",
62 "ipynb",
63 "--pipe",
64 "jupyter nbconvert --stdin --stdout --to notebook --execute",
65 ]
66 )
67
68 nb = read(tmp_ipynb)
69 assert len(nb.cells) == 1
70 assert nb.cells[0].outputs[0]["data"] == {"text/plain": "3"}
71
72
73@pytest.mark.requires_user_kernel_python3

Callers

nothing calls this directly

Calls 3

readFunction · 0.90
jupytextFunction · 0.85
writeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…