Skip to content

Commit 25a86fe

Browse files
committed
Fix tests for issue #235
1 parent a7447b0 commit 25a86fe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_future/test_utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
TEST_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+
2126
class 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:

0 commit comments

Comments
 (0)