MCPcopy Create free account
hub / github.com/ipython/ipython / formatFailure

Method formatFailure

IPython/testing/iptest.py:358–369  ·  view source on GitHub ↗
(self, test, err)

Source from the content-addressed store, hash-verified

356 self.stream_capturer.reset_buffer()
357
358 def formatFailure(self, test, err):
359 # Show output
360 ec, ev, tb = err
361 captured = self.stream_capturer.get_buffer().decode('utf-8', 'replace')
362 if captured.strip():
363 ev = safe_str(ev)
364 out = [ev, '>> begin captured subprocess output <<',
365 captured,
366 '>> end captured subprocess output <<']
367 return ec, '\n'.join(out), tb
368
369 return err
370
371 formatError = formatFailure
372

Callers

nothing calls this directly

Calls 1

get_bufferMethod · 0.80

Tested by

no test coverage detected