We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 923798e commit bfcbbe4Copy full SHA for bfcbbe4
tests/functional/others/test_active_cells.py
@@ -291,6 +291,19 @@ def test_active_cells_from_py_percent(
291
compare(text2, text)
292
293
294
+def test_comments_work_in_active_cells_from_py_percent_1131(
295
+ text="""# %% tags=["active-py"]
296
+# this is a comment
297
+""",
298
+):
299
+ nb = jupytext.reads(text, "py:percent")
300
+ assert nb.cells[0].cell_type == "raw"
301
+ assert nb.cells[0].source == "# this is a comment"
302
+
303
+ text2 = jupytext.writes(nb, "py:percent")
304
+ compare(text2, text)
305
306
307
def test_active_cells_from_py_light(
308
text="""# + active="py"
309
print('should only be displayed in py file')
0 commit comments