Skip to content

Commit

Permalink
Try to reproduce #564 with the CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Jul 21, 2020
1 parent ea2772c commit 69a75ba
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,3 +1103,19 @@ def test_sync_pipe_config(tmpdir):
text = nb.cells[0].source
assert len(text.splitlines()) == 3
assert text != long_text


def test_sync_script_dotdot_folder_564(tmpdir):
"""Reproduce the setting of issue #564"""
nb_file = tmpdir.mkdir("colabs").mkdir("colabs").join("rigid_object_tutorial.ipynb")
py_file = tmpdir.join("colabs").mkdir("nb_python").join("rigid_object_tutorial.py")
py_file.write("1 + 1\n")

jupytext(
["--set-formats", "../nb_python//py:percent,../colabs//ipynb", str(py_file)]
)

assert nb_file.exists()

jupytext(["--sync", str(py_file)])
jupytext(["--sync", str(nb_file)])

0 comments on commit 69a75ba

Please sign in to comment.