4

In IPython (see 1) exception traceback printouts are much easier to understand due to human-friendly coloring and spacing.

However if I run a script containing unittests (using the unittest module of the standard library) I get the normal monochrome traceback printouts like in the standard python shell.

Q: How to combine the traceback formatting of IPython with the output of unittest module?

Eric Leschinski
  • 146,994
  • 96
  • 417
  • 335
cknoll
  • 2,130
  • 4
  • 18
  • 34
  • I flagged as duplicate to http://stackoverflow.com/questions/5203633/unittest-colored-output but the answer there might not be the best anymore as this is 3 years old, and we have Python 3 now, etc. – Unapiedra Nov 26 '14 at 11:04
  • While it is not exactly what I looked for, the answer of David (http://stackoverflow.com/a/11313556/333403) serves my needs. – cknoll Nov 26 '14 at 12:43
  • However, the problem of rednose (which David suggested, see my comment above) is that it does not work together with the IPython embeded shell (from IPython import embed; ... embed() ...) which I use extensively during debugging. – cknoll Nov 27 '14 at 09:41

0 Answers0