facebook/TestSlide

Print chained tracebacks

fornellas opened this issue · 1 comments

The code at runner.py (print_failed_example) currently only prints BaseException.__traceback__ on test failures, and completely ignores BaseException.__cause__. This hides important information that is useful to fix things.

Let's improve this' and make print_failed_example print both __traceback__ and __cause__.

print_failed_example has some formatting logic there (indentation, trimming path prefix), this would have to be applied to both stack traces.

@shish I think this may be the solution to that case you mentioned the typing error didn't give the proper stack trace.