()
| 387 | |
| 388 | |
| 389 | def test_update_display(): |
| 390 | ip = get_ipython() |
| 391 | with mock.patch.object(ip.display_pub, 'publish') as pub: |
| 392 | with nt.assert_raises(TypeError): |
| 393 | display.update_display('x') |
| 394 | display.update_display('x', display_id='1') |
| 395 | display.update_display('y', display_id='2') |
| 396 | args, kwargs = pub.call_args_list[0] |
| 397 | nt.assert_equal(args, ()) |
| 398 | nt.assert_equal(kwargs, { |
| 399 | 'data': { |
| 400 | 'text/plain': repr('x') |
| 401 | }, |
| 402 | 'metadata': {}, |
| 403 | 'transient': { |
| 404 | 'display_id': '1', |
| 405 | }, |
| 406 | 'update': True, |
| 407 | }) |
| 408 | args, kwargs = pub.call_args_list[1] |
| 409 | nt.assert_equal(args, ()) |
| 410 | nt.assert_equal(kwargs, { |
| 411 | 'data': { |
| 412 | 'text/plain': repr('y') |
| 413 | }, |
| 414 | 'metadata': {}, |
| 415 | 'transient': { |
| 416 | 'display_id': '2', |
| 417 | }, |
| 418 | 'update': True, |
| 419 | }) |
| 420 | |
| 421 | |
| 422 | def test_display_handle(): |
nothing calls this directly
no test coverage detected