[py-dev] Generative tests & teardown_method()

Tom Harris beacybooks at bigpond.com
Mon Feb 26 04:13:22 CET 2007


Greetings,

Thanks for all the help on my test directories question, now I have 
another about generative tests.

When a series of such tests are run, the teardown_method() method is not 
run until the generator function that makes them is done. This was not 
what I expected or wanted to happen, as the generated tests each open a 
network connection, and after about 50 or so, my machine was suffering a 
bit under the load!
Would it be better if a generator called setup/teardown once  for _each_ 
generated test?

Tom Harris BeacyBooks <beacybooks at bigpond.com>


>  
>



More information about the Pytest-dev mailing list