File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -220,11 +220,13 @@ def test_rich_inspect_not_at_breakpoint(kernel_with_debug):
220220
221221
222222def test_rich_inspect_at_breakpoint (kernel_with_debug ):
223- code = """def f(a, b):
223+ code = """def f(a, b, html ):
224224 c = a + b
225225 return c
226226
227- f(2, 3)"""
227+ from IPython.core.display import HTML
228+ html = HTML("<div><p>Hello World!</p></div>")
229+ f(2, 3, html)"""
228230
229231 r = wait_for_debug_request (kernel_with_debug , "dumpCell" , {"code" : code })
230232 source = r ["body" ]["sourcePath" ]
@@ -276,6 +278,14 @@ def test_rich_inspect_at_breakpoint(kernel_with_debug):
276278
277279 assert reply ["body" ]["data" ] == {"text/plain" : locals_ [0 ]["value" ]}
278280
281+ reply = wait_for_debug_request (
282+ kernel_with_debug ,
283+ "richInspectVariables" ,
284+ {"variableName" : locals_ [2 ]["name" ], "frameId" : stacks [0 ]["id" ]},
285+ )
286+
287+ assert reply ["body" ]["data" ] == {'text/html' : '<div><p>Hello World!</p></div>' , 'text/plain' : '<IPython.core.displa...ML object>' }
288+
279289
280290def test_convert_to_long_pathname ():
281291 if sys .platform == "win32" :
You can’t perform that action at this time.
0 commit comments