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):
31243124 class MyException (Exception ):
31253125 pass
31263126
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 )
31313134
31323135 def test_from_exception (self ):
31333136 # Check all the parameters are accepted.
You can’t perform that action at this time.
0 commit comments