[py-dev] utest docs; questions

holger krekel hpk at trillke.net
Thu Oct 14 21:00:27 CEST 2004


Hi Ian, 

[Ian Bicking Thu, Oct 14, 2004 at 12:57:25PM -0500]
> Reading through the utest docs, I have a few questions:
> 
> """
> Managing test state across test modules, classes and methods
> ------------------------------------------------------------
> 
> Often you want to create some test files, db-connections or
> other state in order to run tests in a certain environment.
> With ``py.test`` there are three scopes for which you can
> provide hooks to manage such state.  These hooks will get
> called by the driver::
> """
> 
> Where are these functions put?  At the module level?  If so, why
> do they receive a module argument?  I guess I can imagine::
> 
>   from common import setup_module

exactly. 

> So that the setup_module function can work on multiple modules.  Is this
> the intention?  Maybe the example below (corrected if necessary) would 
> make this all more clear.
>

yes, makes sense ... i just committed updated documentation and a
working example (there is a new example-directory now) inspired 
by your suggestion. 

cheers, 

    holger



More information about the Pytest-dev mailing list