[TIP] Hi, beginner nose question

iain duncan iainduncan at telus.net
Tue Nov 20 12:18:46 PST 2007


On Tue, 2007-20-11 at 13:03 -0500, jason pellerin wrote:
> On Nov 20, 2007 5:10 AM, iain duncan <iainduncan at telus.net> wrote:
> 
> > - module level setup and teardown ( why the capitalization difference? )
> 
> Author's privilege. ;) I hate camel case. It's used throughout nose to
> match unittest, where necessary, but even in the bleak camelCase days
> of yore, functions weren't generally camelCased, only methods. That's
> also why the assert_* functions in nose.tools are renamed to
> de-camelize them, and why non-camel alternatives exist for other names
> (like setup_class) that have no direct unittest equivalent.
> 
> > Am I missing something or am I trying something that is just bad
> > practice? Is there any reason nose could not permit such a thing?
> 
> As Pete says below, you can use class-level fixtures, as long as
> you're using the most recent nose release -- support for them was
> added in 0.10.
> 

Thanks all. I found a previous reply on the class method fixtures in the
archives later too.  oops!

Hey Titus, do you think we could add an example of the class level
fixtures to your excellent tutorial at:
http://ivory.idyll.org/articles/nose-intro.html  ?

If the class example were added to the section on fixtures it would
likely nip some more questions in the bud. Thanks for the tutorial and
all the tools people!

Iain




More information about the testing-in-python mailing list