[TIP] Green and Red bars

Ned Batchelder ned at nedbatchelder.com
Sat Oct 9 17:25:00 PDT 2010

  Hi Natalia,

I understand wanting to keep things simple for the newbs, but it looks 
like there's a plugin for nose that does what you want: 

I think introducing nose is a good idea even for beginners, because it 
simplifies writing tests.  Without nose, you have to build suites, with 
nose, you can skip all that code.


PS: I remember talking to you in the snack room at Pycon, glad to see 
you are out there spreading the word!

On 10/9/2010 4:37 PM, Natalia Bidart wrote:
> Hello List!
> First of all, I'll introduce myself: I'm Natalia, I live in Argentina
> and I've been following the list since PyCon USA 2010. I must confess
> that back then I loved Michael's and Ned's talks, and (mainly) because
> of them I joined the list.
> The reason of my writing is that I'll be giving a talk about Testing
> at PyCon Argentina 2010, which will take place next October 15th and
> 16th, and I need some input from you all. I'm very fond to the concept
> of "getting a green bar" (ergo also to the concept of "red bar"), but
> I'm finding some problems on actually getting a *green* or *red* bar
> using the unittest runner.
> What do I mean? I mean that I want colors! Not because they are nice
> to watch, but because they are a great, easily and understandable
> indicator of how good or bad things are, and because we can easily
> detect whether we're at a point when we need to add some code to make
> a test pass, or even better we're in shape to add another test.
> My test runner of choice is trial mainly because of this, you get a
> lovely visual verdict when running the test suite. But since I'm
> giving this talk to potential newbies on testing, I would like to
> stick to showing/using only unittest (and unittest2), and to not
> depend on trial (though I will mention/recommend it at the end).
> Summing up: is there any way of getting green/red bars using unittest?
> Thanks!
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python

More information about the testing-in-python mailing list