MCPcopy Index your code
hub / github.com/ipython/ipython / test_update_display

Function test_update_display

tests/test_display_2.py:481–507  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

479
480
481def test_update_display():
482 ip = get_ipython()
483 with mock.patch.object(ip.display_pub, "publish") as pub:
484 with pytest.raises(TypeError):
485 display.update_display("x")
486 display.update_display("x", display_id="1")
487 display.update_display("y", display_id="2")
488 args, kwargs = pub.call_args_list[0]
489 assert args == ()
490 assert kwargs == {
491 "data": {"text/plain": repr("x")},
492 "metadata": {},
493 "transient": {
494 "display_id": "1",
495 },
496 "update": True,
497 }
498 args, kwargs = pub.call_args_list[1]
499 assert args == ()
500 assert kwargs == {
501 "data": {"text/plain": repr("y")},
502 "metadata": {},
503 "transient": {
504 "display_id": "2",
505 },
506 "update": True,
507 }
508
509
510def test_display_handle():

Callers

nothing calls this directly

Calls 1

get_ipythonFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…