(tmpdir, caplog, capsys)
| 74 | @pytest.mark.requires_nbconvert |
| 75 | @pytest.mark.skip_on_windows |
| 76 | def test_execute(tmpdir, caplog, capsys): |
| 77 | tmp_ipynb = str(tmpdir.join("notebook.ipynb")) |
| 78 | tmp_py = str(tmpdir.join("notebook.py")) |
| 79 | |
| 80 | with open(tmp_py, "w") as fp: |
| 81 | fp.write( |
| 82 | """1 + 2 |
| 83 | """ |
| 84 | ) |
| 85 | |
| 86 | jupytext(args=[tmp_py, "--to", "ipynb", "--execute"]) |
| 87 | |
| 88 | nb = read(tmp_ipynb) |
| 89 | assert len(nb.cells) == 1 |
| 90 | assert nb.cells[0].outputs[0]["data"] == {"text/plain": "3"} |
| 91 | |
| 92 | |
| 93 | @pytest.mark.requires_user_kernel_python3 |