Skip to content

Commit f7c7ebd

Browse files
author
Jordan Adler
committed
iter
1 parent 2b82a88 commit f7c7ebd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_future/test_utils.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -349,15 +349,15 @@ def test_single_exception_stacktrace(self):
349349
if PY2:
350350
def test_chained_exceptions_stacktrace(self):
351351
expected = '''Traceback (most recent call last):
352-
File "/opt/python-future/tests/test_future/test_utils.py", line 354, in test_chained_exceptions_stacktrace
352+
File "/opt/python-future/tests/test_future/test_utils.py", line 1, in test_chained_exceptions_stacktrace
353353
raise_from(CustomException('ERROR'), val_err)
354-
File "/opt/python-future/src/future/utils/__init__.py", line 456, in raise_from
354+
File "/opt/python-future/src/future/utils/__init__.py", line 1, in raise_from
355355
raise e
356356
CustomException: ERROR
357357
358358
The above exception was the direct cause of the following exception:
359359
360-
File "/opt/python-future/tests/test_future/test_utils.py", line 352, in test_chained_exceptions_stacktrace
360+
File "/opt/python-future/tests/test_future/test_utils.py", line 1, in test_chained_exceptions_stacktrace
361361
raise ValueError('Wooops')
362362
ValueError: Wooops
363363
'''
@@ -369,6 +369,7 @@ def test_chained_exceptions_stacktrace(self):
369369
raise_from(CustomException('ERROR'), val_err)
370370
except Exception as err:
371371
ret = re.sub(r'"[^"]*tests/test_future', '"/opt/python-future/tests/test_future', traceback.format_exc())
372+
ret = re.sub(r', line \d+,', ', line 1,', ret)
372373
self.assertEqual(expected.splitlines(), ret.splitlines())
373374
else:
374375
self.fail('No exception raised')

0 commit comments

Comments
 (0)