On 22/05/2013 01:25, Jim Mooney wrote:
Okay, why is nose saying this run is OK when I purposely screwed it up?

import nose

def stand_and_deliver():
     return 52

def stupid_error():
     '''This is my stupid error'''
     assert stand_and_deliver() == 17

if __name__ == '__main__':
     nose.runmodule()

nose result:

Ran 0 tests in 0.000s

OK



Do you ever bother to investigate anything before posing a question? I know nothing about nose, but when I see output telling me that precisely nothing has been run, I'd hazard a guess that stupid_error has to be called test_stupid_error or similar. I'll leave you to check the nose docs to confirm whether or not my guess is correct.

--
If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython.

Mark Lawrence

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to