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

Method test_print_exception

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

Source from the content-addressed store, hash-verified

533 self.assertEqual(stderr.splitlines(), expected)
534
535 def test_print_exception(self):
536 output = StringIO()
537 traceback.print_exception(
538 Exception, Exception("projector"), None, file=output
539 )
540 self.assertEqual(output.getvalue(), "Exception: projector\n")
541
542 def test_print_exception_exc(self):
543 output = StringIO()

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