MCPcopy Index your code
hub / github.com/python/cpython / test_format_base_exception_group

Method test_format_base_exception_group

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

Source from the content-addressed store, hash-verified

270 ])
271
272 def test_format_base_exception_group(self):
273 eg = BaseExceptionGroup('A', [BaseException('B')])
274 err = traceback.format_exception_only(eg, show_group=True)
275 self.assertEqual(err, [
276 'BaseExceptionGroup: A (1 sub-exception)\n',
277 ' BaseException: B\n',
278 ])
279
280 def test_format_exception_group_with_note(self):
281 exc = ValueError('B')

Callers

nothing calls this directly

Calls 2

format_exception_onlyMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected