File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 18
18
TEST_UNICODE_STR = u'ℝεα∂@ßʟ℮ ☂ℯṧт υηḯ¢☺ḓ℮'
19
19
20
20
21
+ class MyExceptionIssue235 (Exception ):
22
+ def __init__ (self , a , b ):
23
+ super (MyExceptionIssue235 , self ).__init__ ('{0}: {1}' .format (a , b ))
24
+
25
+
21
26
class TestUtils (unittest .TestCase ):
22
27
def setUp (self ):
23
28
self .s = TEST_UNICODE_STR
@@ -153,12 +158,8 @@ def test_raise_from_None(self):
153
158
self .assertIsNone (e .__cause__ )
154
159
155
160
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
-
160
161
def foo ():
161
- raise MyException (3 , 7 )
162
+ raise MyExceptionIssue235 (3 , 7 )
162
163
163
164
def bar ():
164
165
try :
@@ -288,7 +289,6 @@ def test_class_cause(self):
288
289
else :
289
290
self .fail ("No exception raised" )
290
291
291
- @expectedFailurePY3
292
292
def test_instance_cause (self ):
293
293
cause = KeyError ('blah' )
294
294
try :
You can’t perform that action at this time.
0 commit comments