Skip to content

Commit 9aad373

Browse files
committed
Update expected result
1 parent 1ffd278 commit 9aad373

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

ipykernel/tests/test_debugger.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import sys
22

3+
from IPython.core.display import HTML
34
import pytest
45

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

221222

222223
def test_rich_inspect_at_breakpoint(kernel_with_debug):
223-
code = """def f(a, b, html):
224+
text_html = "<div><p>Hello World!</p></div>"
225+
text_plain = str(HTML(text_html))
226+
227+
code = f"""def f(a, b, html):
224228
c = a + b
225229
return c
226230
227231
from IPython.core.display import HTML
228-
html = HTML("<div><p>Hello World!</p></div>")
232+
html = HTML("{text_html}")
229233
f(2, 3, html)"""
230234

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

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

289296

290297
def test_convert_to_long_pathname():

0 commit comments

Comments
 (0)