From 9aad37319d2f11453bf8fdbc14353aca46695902 Mon Sep 17 00:00:00 2001 From: David Brochart Date: Mon, 30 May 2022 14:03:53 +0200 Subject: [PATCH] Update expected result --- ipykernel/tests/test_debugger.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ipykernel/tests/test_debugger.py b/ipykernel/tests/test_debugger.py index 82e11b659..ebc04a148 100644 --- a/ipykernel/tests/test_debugger.py +++ b/ipykernel/tests/test_debugger.py @@ -1,5 +1,6 @@ import sys +from IPython.core.display import HTML import pytest from .utils import TIMEOUT, get_reply, new_kernel @@ -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 = "

Hello World!

" + 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("

Hello World!

") +html = HTML("{text_html}") f(2, 3, html)""" r = wait_for_debug_request(kernel_with_debug, "dumpCell", {"code": code}) @@ -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': '

Hello World!

', 'text/plain': ''} + assert reply["body"]["data"] == { + "text/html": text_html, + "text/plain": text_plain, + } def test_convert_to_long_pathname():