MCPcopy
hub / github.com/jupytext/jupytext / test_pipe_nbconvert_execute

Function test_pipe_nbconvert_execute

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

Source from the content-addressed store, hash-verified

13@pytest.mark.requires_nbconvert
14@pytest.mark.skip_on_windows
15def test_pipe_nbconvert_execute(tmpdir):
16 tmp_ipynb = str(tmpdir.join("notebook.ipynb"))
17 tmp_py = str(tmpdir.join("notebook.py"))
18
19 with open(tmp_py, "w") as fp:
20 fp.write(
21 """1 + 2
22"""
23 )
24
25 jupytext(
26 args=[
27 tmp_py,
28 "--to",
29 "ipynb",
30 "--pipe-fmt",
31 "ipynb",
32 "--pipe",
33 "jupyter nbconvert --stdin --stdout --to notebook --execute",
34 ]
35 )
36
37 nb = read(tmp_ipynb)
38 assert len(nb.cells) == 1
39 assert nb.cells[0].outputs[0]["data"] == {"text/plain": "3"}
40
41
42@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…