MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_print_exception_exc

Method test_print_exception_exc

Lib/test/test_traceback.py:542–545  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

540 self.assertEqual(output.getvalue(), "Exception: projector\n")
541
542 def test_print_exception_exc(self):
543 output = StringIO()
544 traceback.print_exception(Exception("projector"), file=output)
545 self.assertEqual(output.getvalue(), "Exception: projector\n")
546
547 def test_print_last(self):
548 with support.swap_attr(sys, 'last_exc', ValueError(42)):

Callers

nothing calls this directly

Calls 4

getvalueMethod · 0.95
StringIOClass · 0.90
print_exceptionMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected