@@ -349,15 +349,15 @@ def test_single_exception_stacktrace(self):
349
349
if PY2 :
350
350
def test_chained_exceptions_stacktrace (self ):
351
351
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
353
353
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
355
355
raise e
356
356
CustomException: ERROR
357
357
358
358
The above exception was the direct cause of the following exception:
359
359
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
361
361
raise ValueError('Wooops')
362
362
ValueError: Wooops
363
363
'''
@@ -369,6 +369,7 @@ def test_chained_exceptions_stacktrace(self):
369
369
raise_from (CustomException ('ERROR' ), val_err )
370
370
except Exception as err :
371
371
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 )
372
373
self .assertEqual (expected .splitlines (), ret .splitlines ())
373
374
else :
374
375
self .fail ('No exception raised' )
0 commit comments