fix a problem and make a note about pytest_nose calling setup/teardown functions

--HG--
branch : trunk
This commit is contained in:
holger krekel 2010-10-03 11:17:37 +02:00
parent a6003ac332
commit 939a53c436
2 changed files with 6 additions and 3 deletions

View File

@ -6,6 +6,9 @@ tags: bug 1.4 core xdist
* check oejskit plugin compatibility
* terminal reporting - dot-printing
* some simple profiling
* move pytest_nose out of pylib because it implicitely extends
the protocol now - setup/teardown is called at module level.
consider making calling of setup/teardown configurable
refine session initialization / fix custom collect crash
---------------------------------------------------------------

View File

@ -831,12 +831,12 @@ class TestRequestCachedSetup:
testdir.makepyfile(test_0="""
l = []
def pytest_funcarg__something(request):
val = request.cached_setup(setup, teardown)
val = request.cached_setup(fsetup, fteardown)
return val
def setup(mycache=[1]):
def fsetup(mycache=[1]):
l.append(mycache.pop())
return l
def teardown(something):
def fteardown(something):
l.remove(something[0])
l.append(2)
def test_list_once(something):