File tree 1 file changed +12
-2
lines changed
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):
220
220
221
221
222
222
def test_rich_inspect_at_breakpoint (kernel_with_debug ):
223
- code = """def f(a, b):
223
+ code = """def f(a, b, html ):
224
224
c = a + b
225
225
return c
226
226
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)"""
228
230
229
231
r = wait_for_debug_request (kernel_with_debug , "dumpCell" , {"code" : code })
230
232
source = r ["body" ]["sourcePath" ]
@@ -276,6 +278,14 @@ def test_rich_inspect_at_breakpoint(kernel_with_debug):
276
278
277
279
assert reply ["body" ]["data" ] == {"text/plain" : locals_ [0 ]["value" ]}
278
280
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
+
279
289
280
290
def test_convert_to_long_pathname ():
281
291
if sys .platform == "win32" :
You can’t perform that action at this time.
0 commit comments