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

Function test_error_method

tests/test_formatters.py:297–310  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

295
296
297def test_error_method():
298 f = HTMLFormatter()
299
300 class BadHTML(object):
301 def _repr_html_(self):
302 raise ValueError("Bad HTML")
303
304 bad = BadHTML()
305 with capture_output() as captured:
306 result = f(bad)
307 assert result is None
308 assert "Traceback" in captured.stdout
309 assert "Bad HTML" in captured.stdout
310 assert "_repr_html_" in captured.stdout
311
312
313def test_nowarn_notimplemented():

Callers

nothing calls this directly

Calls 4

HTMLFormatterClass · 0.90
BadHTMLClass · 0.85
capture_outputClass · 0.85
fFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…