| 496 | |
| 497 | def test_repr_mime(): |
| 498 | class HasReprMime(object): |
| 499 | def _repr_mimebundle_(self, include=None, exclude=None): |
| 500 | return { |
| 501 | "application/json+test.v2": {"x": "y"}, |
| 502 | "plain/text": "<HasReprMime>", |
| 503 | "image/png": "i-overwrite", |
| 504 | } |
| 505 | |
| 506 | def _repr_png_(self): |
| 507 | return "should-be-overwritten" |
| 508 | |
| 509 | def _repr_html_(self): |
| 510 | return "<b>hi!</b>" |
| 511 | |
| 512 | f = get_ipython().display_formatter |
| 513 | html_f = f.formatters["text/html"] |
no outgoing calls
searching dependent graphs…