Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_markdown_cell is failing #209

Closed
echarles opened this issue Jan 29, 2023 · 0 comments · Fixed by #210
Closed

test_markdown_cell is failing #209

echarles opened this issue Jan 29, 2023 · 0 comments · Fixed by #210
Assignees
Labels
bug Something isn't working

Comments

@echarles
Copy link
Member

This is the error details.

=================================== FAILURES ===================================
______________________________ test_markdown_cell ______________________________

prefill_notebook = <function prefill_notebook.<locals>.inner at 0x7fa4a899c940>

    def test_markdown_cell(prefill_notebook):
        notebook_frontend = prefill_notebook([new_markdown_cell(md) for md in [
            '# Foo', '**Bar**', '*Baz*', '```\nx = 1\n```', '```aaaa\nx = 1\n```',
            '```python\ns = "$"\nt = "$"\n```'
        ]])
    
>       assert get_rendered_contents(notebook_frontend) == [
            '<h1 id="Foo">Foo<a class="anchor-link" href="#Foo">¶</a></h1>',
            '<p><strong>Bar</strong></p>',
            '<p><em>Baz</em></p>',
            '<pre><code>x = 1</code></pre>',
            '<pre><code class="cm-s-ipython language-aaaa">x = 1</code></pre>',
            '<pre><code class="cm-s-ipython language-python">' +
            '<span class="cm-variable">s</span> <span class="cm-operator">=</span> <span class="cm-string">"$"</span>\n' +
            '<span class="cm-variable">t</span> <span class="cm-operator">=</span> <span class="cm-string">"$"</span></code></pre>'
        ]
E       assert ['<h1 id="Foo.../code></pre>'] == ['<h1 id="Foo.../code></pre>']
E         At index 3 diff: '<pre><code>x = 1\n</code></pre>' != '<pre><code>x = 1</code></pre>'
E         Full diff:
E           [
E            '<h1 id="Foo">Foo<a class="anchor-link" href="#Foo">¶</a></h1>',
E            '<p><strong>Bar</strong></p>',
E            '<p><em>Baz</em></p>',
E         -  '<pre><code>x = 1</code></pre>',
E         +  '<pre><code>x = 1\n'
E         +  '</code></pre>',
E         -  '<pre><code class="cm-s-ipython language-aaaa">x = 1</code></pre>',
E         ?                                                      ^^^^^^^^^^^^^ -
E         +  '<pre><code class="cm-s-ipython language-aaaa">x = 1\n'
E         ?                                                      ^^
E         +  '</code></pre>',
E            '<pre><code class="cm-s-ipython language-python"><span '
E            'class="cm-variable">s</span> <span class="cm-operator">=</span> <span '
E            'class="cm-string">"$"</span>\n'
E            '<span class="cm-variable">t</span> <span class="cm-operator">=</span> <span '
E         -  'class="cm-string">"$"</span></code></pre>',
E         ?                               ^^^^^^^^^^^^^ -
E         +  'class="cm-string">"$"</span>\n'
E         ?                               ^^
E         +  '</code></pre>',
E           ]

nbclassic/tests/end_to_end/test_markdown.py:26: AssertionError
=========================== short test summary info ============================
FAILED nbclassic/tests/end_to_end/test_markdown.py::test_markdown_cell - assert ['<h1 id="Foo.../code></pre>'] == ['<h1 id="Foo.../code></pre>']
  At index 3 diff: '<pre><code>x = 1\n</code></pre>' != '<pre><code>x = 1</code></pre>'
  Full diff:
    [
     '<h1 id="Foo">Foo<a class="anchor-link" href="#Foo">¶</a></h1>',
     '<p><strong>Bar</strong></p>',
     '<p><em>Baz</em></p>',
  -  '<pre><code>x = 1</code></pre>',
  +  '<pre><code>x = 1\n'
  +  '</code></pre>',
  -  '<pre><code class="cm-s-ipython language-aaaa">x = 1</code></pre>',
  ?                                                      ^^^^^^^^^^^^^ -
  +  '<pre><code class="cm-s-ipython language-aaaa">x = 1\n'
  ?                                                      ^^
  +  '</code></pre>',
     '<pre><code class="cm-s-ipython language-python"><span '
     'class="cm-variable">s</span> <span class="cm-operator">=</span> <span '
     'class="cm-string">"$"</span>\n'
     '<span class="cm-variable">t</span> <span class="cm-operator">=</span> <span '
  -  'class="cm-string">"$"</span></code></pre>',
  ?                               ^^^^^^^^^^^^^ -
  +  'class="cm-string">"$"</span>\n'
  ?                               ^^
  +  '</code></pre>',
    ]
=================== 1 failed, 30 passed in 269.13s (0:04:29) ===================
Error: Process completed 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant