Skip to content

Commit 2b82a88

Browse files
author
Jordan Adler
committed
Remove flakiness in test_chained_exception
1 parent d711695 commit 2b82a88

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_future/test_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,8 @@ def test_chained_exceptions_stacktrace(self):
368368
except ValueError as val_err:
369369
raise_from(CustomException('ERROR'), val_err)
370370
except Exception as err:
371-
self.assertEqual(expected.splitlines(), traceback.format_exc().splitlines())
371+
ret = re.sub(r'"[^"]*tests/test_future', '"/opt/python-future/tests/test_future', traceback.format_exc())
372+
self.assertEqual(expected.splitlines(), ret.splitlines())
372373
else:
373374
self.fail('No exception raised')
374375

0 commit comments

Comments
 (0)