Initial nose experience

Roy Smith roy at
Fri Jul 27 16:51:48 CEST 2012

In article <roy-F2685A.08422113072012 at>,
 Roy Smith <roy at> wrote:

> Lastly, nose, by default, doesn't say much.  When things go wrong and 
> you have no clue what's happening, --verbose and --debug are your 
> friends.

I found another example of nose not saying much, and this one is kind of 
annoying.  Unittest has much richer assertions, and better reporting 
when they fail.  If a nose assertion fails, you just get:

Traceback (most recent call last):
line 197, in runTest
  File "/home/roy/songza/pyza/djapi/", line 48, in 
    assert user_list == [9990]

Under unittest, it would have printed the value of user_list.  Yeah, I 
know, I can stick a "print user_list" statement into the test, and the 
output will get suppressed if the test fails.  But that means when a 
test fails, I need to go back and edit the test code, which is a pain.

On the other hand, there *is* an incremental efficiency gain of writing:

assert x == y

instead of

assertEqual(x, y)

many times.  So maybe overall it's a wash.

More information about the Python-list mailing list