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

Method test_smoke_user_exception

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

Source from the content-addressed store, hash-verified

3564 self.do_test_smoke(ValueError(42), 'ValueError')
3565
3566 def test_smoke_user_exception(self):
3567 class MyException(Exception):
3568 pass
3569
3570 if __name__ == '__main__':
3571 expected = ('TestTracebackException.'
3572 'test_smoke_user_exception.<locals>.MyException')
3573 else:
3574 expected = ('test.test_traceback.TestTracebackException.'
3575 'test_smoke_user_exception.<locals>.MyException')
3576 self.do_test_smoke(MyException('bad things happened'), expected)
3577
3578 def test_from_exception(self):
3579 # Check all the parameters are accepted.

Callers

nothing calls this directly

Calls 2

do_test_smokeMethod · 0.95
MyExceptionClass · 0.70

Tested by

no test coverage detected