Skip to content

Commit

Permalink
Update expected result
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed May 30, 2022
1 parent 1ffd278 commit 9aad373
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ipykernel/tests/test_debugger.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import sys

from IPython.core.display import HTML
import pytest

from .utils import TIMEOUT, get_reply, new_kernel
Expand Down Expand Up @@ -220,12 +221,15 @@ def test_rich_inspect_not_at_breakpoint(kernel_with_debug):


def test_rich_inspect_at_breakpoint(kernel_with_debug):
code = """def f(a, b, html):
text_html = "<div><p>Hello World!</p></div>"
text_plain = str(HTML(text_html))

code = f"""def f(a, b, html):
c = a + b
return c
from IPython.core.display import HTML
html = HTML("<div><p>Hello World!</p></div>")
html = HTML("{text_html}")
f(2, 3, html)"""

r = wait_for_debug_request(kernel_with_debug, "dumpCell", {"code": code})
Expand Down Expand Up @@ -284,7 +288,10 @@ def test_rich_inspect_at_breakpoint(kernel_with_debug):
{"variableName": locals_[2]["name"], "frameId": stacks[0]["id"]},
)

assert reply["body"]["data"] == {'text/html': '<div><p>Hello World!</p></div>', 'text/plain': '<IPython.core.displa...ML object>'}
assert reply["body"]["data"] == {
"text/html": text_html,
"text/plain": text_plain,
}


def test_convert_to_long_pathname():
Expand Down

0 comments on commit 9aad373

Please sign in to comment.