Re: [Tutor] still nosing around

2013-05-22 Thread Dave Angel
On 22 May 2013 05:26, Jim Mooney wrote: > But that brings up a point. Does this mean that if I have to test a > module with a lot of subroutines I have to rename every subroutine > with 'test' appended? > No, you don't rename the existing functions. But the testing functions need to be ident

Re: [Tutor] still nosing around

2013-05-22 Thread Walter Prins
Hi, On 22 May 2013 05:26, Jim Mooney wrote: > But that brings up a point. Does this mean that if I have to test a > module with a lot of subroutines I have to rename every subroutine > with 'test' appended? > Some quick comments for what it's worth: (One of) the points about nose is to make les

Re: [Tutor] still nosing around

2013-05-22 Thread Albert-Jan Roskam
  > Personally, I recommend you start with doctests rather than nose or unittest. Doctests can also be run using nose, maybe that's also an idea? Nose does doctest, unittest, and its own tests. By default, test files need to have a prefix "test_". Unless you specify this either as a comman

Re: [Tutor] still nosing around

2013-05-21 Thread Steven D'Aprano
On 22/05/13 10:50, Mark Lawrence wrote: Do you ever bother to investigate anything before posing a question? That's rather harsh. The OP is doing a fine job at investigating new tools, and he's far more adventurous than I was at his level of expertise. (Or now, for that matter...) I think w

Re: [Tutor] still nosing around

2013-05-21 Thread Steven D'Aprano
On 22/05/13 10: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.ru

Re: [Tutor] still nosing around

2013-05-21 Thread Mark Lawrence
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.

[Tutor] still nosing around

2013-05-21 Thread Jim Mooney
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.0