()
| 508 | |
| 509 | |
| 510 | def test_display_handle(): |
| 511 | ip = get_ipython() |
| 512 | handle = display.DisplayHandle() |
| 513 | assert isinstance(handle.display_id, str) |
| 514 | handle = display.DisplayHandle("my-id") |
| 515 | assert handle.display_id == "my-id" |
| 516 | with mock.patch.object(ip.display_pub, "publish") as pub: |
| 517 | handle.display("x") |
| 518 | handle.update("y") |
| 519 | |
| 520 | args, kwargs = pub.call_args_list[0] |
| 521 | assert args == () |
| 522 | assert kwargs == { |
| 523 | "data": {"text/plain": repr("x")}, |
| 524 | "metadata": {}, |
| 525 | "transient": { |
| 526 | "display_id": handle.display_id, |
| 527 | }, |
| 528 | } |
| 529 | args, kwargs = pub.call_args_list[1] |
| 530 | assert args == () |
| 531 | assert kwargs == { |
| 532 | "data": {"text/plain": repr("y")}, |
| 533 | "metadata": {}, |
| 534 | "transient": { |
| 535 | "display_id": handle.display_id, |
| 536 | }, |
| 537 | "update": True, |
| 538 | } |
| 539 | |
| 540 | |
| 541 | def test_image_alt_tag(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…