Thursday 31 January 2019

Disabling source output in python unittest stack traces

The unittest framework in python outputs a stack trace when you encounter an exception. Each line of the stack trace is accompanied by source code in the output. This causes the stack trace to be hundreds of lines of scrolling and, in my opinion, very hard to read.

Is there a way to run a python unittest so that when an exception is caught the stack trace output is in a shortened form? I'd like just the source lines, excluding all the extra source.



from Disabling source output in python unittest stack traces

No comments:

Post a Comment