From f870d913d7e6cb06ab0529730acec480d33a2f6c Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Tue, 26 Feb 2019 18:19:10 +0100 Subject: [PATCH] Try to reproduce #191 --- tests/test_read_simple_percent.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/test_read_simple_percent.py b/tests/test_read_simple_percent.py index 814c6511d..b16de2774 100644 --- a/tests/test_read_simple_percent.py +++ b/tests/test_read_simple_percent.py @@ -189,3 +189,20 @@ def test_multiple_empty_cells(): nb2 = jupytext.reads(text, 'py:percent') nb2.metadata = nb.metadata compare(nb, nb2) + + +def test_first_cell_markdown_191(): + text = """# %% [markdown] +# Docstring + +# %% +from math import pi + +# %% [markdown] +# Another markdown cell +""" + + nb = jupytext.reads(text, 'py') + assert nb.cells[0].cell_type == 'markdown' + assert nb.cells[1].cell_type == 'code' + assert nb.cells[2].cell_type == 'markdown'