Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add color to nose2 output

Tags:

python

nose2

This is such a simple question, but I can't find it anywhere... how do I add color to the output of running tests with nose2? For example, I would like failures to show up as red.

like image 487
Alex Altair Avatar asked Aug 01 '14 19:08

Alex Altair


1 Answers

nose2 does not have colored output built in, but a popular third-party plugin named green will color the output for you.

It can easily be installed with pip via : pip3 install green

You can find more information on it within it's pypi page here: https://pypi.python.org/pypi/green

Their GitHub page as well: https://github.com/CleanCut/green

like image 85
Austin Curtis Avatar answered Oct 15 '22 19:10

Austin Curtis