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

@@ -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):