[py-dev] Does each test method get called with a new instance?

Roy Smith roy at panix.com
Fri Apr 8 04:49:00 CEST 2005


On Apr 7, 2005, at 10:40 PM, David Ripton wrote:

> setup_class lets you put multiple test classes that have different
> expensive initialization in one file, rather than making you split them
> up into separate files to use setup_module.

Fair enough.  I was thinking one test class per file/module, but you're 
absolutely right that you might have multiple classes in one module.  
And then having distinct setup_module() and setup_class() makes perfect 
sense.




More information about the Pytest-dev mailing list