Skip to content

Commit

Permalink
Add a test to reproduce #1131
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Nov 12, 2023
1 parent 3fcc046 commit 4e0e72c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/integration/others/test_active_cells.py
Expand Up @@ -291,6 +291,19 @@ def test_active_cells_from_py_percent(
compare(text2, text)


def test_comments_work_in_active_cells_from_py_percent_1131(
text="""# %% tags=["active-py"]
# this is a comment
""",
):
nb = jupytext.reads(text, "py:percent")
assert nb.cells[0].cell_type == "raw"
assert nb.cells[0].source == "# this is a comment"

text2 = jupytext.writes(nb, "py:percent")
compare(text2, text)


def test_active_cells_from_py_light(
text="""# + active="py"
print('should only be displayed in py file')
Expand Down

0 comments on commit 4e0e72c

Please sign in to comment.