File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -3124,10 +3124,13 @@ def test_smoke_user_exception(self):
3124
3124
class MyException (Exception ):
3125
3125
pass
3126
3126
3127
- self .do_test_smoke (
3128
- MyException ('bad things happened' ),
3129
- ('test.test_traceback.TestTracebackException.'
3130
- 'test_smoke_user_exception.<locals>.MyException' ))
3127
+ if __name__ == '__main__' :
3128
+ expected = ('TestTracebackException.'
3129
+ 'test_smoke_user_exception.<locals>.MyException' )
3130
+ else :
3131
+ expected = ('test.test_traceback.TestTracebackException.'
3132
+ 'test_smoke_user_exception.<locals>.MyException' )
3133
+ self .do_test_smoke (MyException ('bad things happened' ), expected )
3131
3134
3132
3135
def test_from_exception (self ):
3133
3136
# Check all the parameters are accepted.
You can’t perform that action at this time.
0 commit comments