def test_decorator():

    markdown = '\n'.join(('```',  # Not putting python still works thanks
                                  # to the input prompt.
                          '>>> @decorator',
                          '... def f():',
                          '...     """Docstring."""',
                          '...',
                          '...     # Comment.',
                          '...     pass',
                          '...',
                          '...     # Comment.',
                          '...     pass',
                          '...     pass',
                          'blah',
                          'blah',
                          '```'))

    cells = convert(markdown, from_='markdown')

    assert '...' not in cells[0]['input']
    assert cells[0]['output'] == 'blah\nblah'

    markdown_bis = convert(cells, to='markdown')
    assert _diff(markdown, markdown_bis.replace('python', '')) == ''
Test a bug fix where empty '...' lines were added to the output.
dataset/ETHPy150Open rossant/ipymd/ipymd/formats/tests/test_markdown.py/test_decorator