fix cached_setup to deal properly for test_functions

with multiple args.  closes #50

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-09-30 12:52:40 +02:00
parent 2986c5dc74
commit 98b2300266
4 changed files with 46 additions and 8 deletions

View File

@@ -388,9 +388,9 @@ managing fixtures across test modules and test runs
def cached_setup(setup, teardown=None, scope="module", extrakey=None):
""" cache and return result of calling setup().
The scope and the ``extrakey`` determine the cache key.
The scope also determines when teardown(result)
will be called. valid scopes are:
The requested argument name, the scope and the ``extrakey``
determine the cache key. The scope also determines when
teardown(result) will be called. valid scopes are:
scope == 'function': when the single test function run finishes.
scope == 'module': when tests in a different module are run
scope == 'session': when tests of the session have run.