File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1818TEST_UNICODE_STR = u'ℝεα∂@ßʟ℮ ☂ℯṧт υηḯ¢☺ḓ℮'
1919
2020
21+ class MyExceptionIssue235 (Exception ):
22+ def __init__ (self , a , b ):
23+ super (MyExceptionIssue235 , self ).__init__ ('{0}: {1}' .format (a , b ))
24+
25+
2126class TestUtils (unittest .TestCase ):
2227 def setUp (self ):
2328 self .s = TEST_UNICODE_STR
@@ -153,12 +158,8 @@ def test_raise_from_None(self):
153158 self .assertIsNone (e .__cause__ )
154159
155160 def test_issue_235 (self ):
156- class MyException (Exception ):
157- def __init__ (self , a , b ):
158- super (MyException , self ).__init__ ('{0}: {1}' .format (a , 7 ))
159-
160161 def foo ():
161- raise MyException (3 , 7 )
162+ raise MyExceptionIssue235 (3 , 7 )
162163
163164 def bar ():
164165 try :
@@ -288,7 +289,6 @@ def test_class_cause(self):
288289 else :
289290 self .fail ("No exception raised" )
290291
291- @expectedFailurePY3
292292 def test_instance_cause (self ):
293293 cause = KeyError ('blah' )
294294 try :
You can’t perform that action at this time.
0 commit comments