Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Lib/test/test_traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -3124,10 +3124,13 @@ def test_smoke_user_exception(self):
class MyException(Exception):
pass

self.do_test_smoke(
MyException('bad things happened'),
('test.test_traceback.TestTracebackException.'
'test_smoke_user_exception.<locals>.MyException'))
if __name__ == '__main__':
expected = ('TestTracebackException.'
'test_smoke_user_exception.<locals>.MyException')
else:
expected = ('test.test_traceback.TestTracebackException.'
'test_smoke_user_exception.<locals>.MyException')
self.do_test_smoke(MyException('bad things happened'), expected)

def test_from_exception(self):
# Check all the parameters are accepted.
Expand Down