fix a problem and make a note about pytest_nose calling setup/teardown functions
--HG-- branch : trunk
This commit is contained in:
parent
a6003ac332
commit
939a53c436
|
@ -6,6 +6,9 @@ tags: bug 1.4 core xdist
|
||||||
* check oejskit plugin compatibility
|
* check oejskit plugin compatibility
|
||||||
* terminal reporting - dot-printing
|
* terminal reporting - dot-printing
|
||||||
* some simple profiling
|
* 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
|
refine session initialization / fix custom collect crash
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
|
|
|
@ -831,12 +831,12 @@ class TestRequestCachedSetup:
|
||||||
testdir.makepyfile(test_0="""
|
testdir.makepyfile(test_0="""
|
||||||
l = []
|
l = []
|
||||||
def pytest_funcarg__something(request):
|
def pytest_funcarg__something(request):
|
||||||
val = request.cached_setup(setup, teardown)
|
val = request.cached_setup(fsetup, fteardown)
|
||||||
return val
|
return val
|
||||||
def setup(mycache=[1]):
|
def fsetup(mycache=[1]):
|
||||||
l.append(mycache.pop())
|
l.append(mycache.pop())
|
||||||
return l
|
return l
|
||||||
def teardown(something):
|
def fteardown(something):
|
||||||
l.remove(something[0])
|
l.remove(something[0])
|
||||||
l.append(2)
|
l.append(2)
|
||||||
def test_list_once(something):
|
def test_list_once(something):
|
||||||
|
|
Loading…
Reference in New Issue