()
| 479 | |
| 480 | |
| 481 | def 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 | |
| 510 | def test_display_handle(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…