[py-dev] Inspecting requested funcargs
Floris Bruynooghe
flub at devork.be
Sun Sep 23 18:45:25 CEST 2012
Hi Holger,
The new api tried to make it possible to know in advance which
funcargs are required for a test function which is a very nice thing
to have. However I'm not sure how to get to the full list:
@pytest.factory()
def arg0():
pass
@pytest.factory()
def arg1(arg0):
pass
@pytest.setup()
def setup(request):
print request.node.funcargnames
def test_foo(arg1):
pass
When executing this with py.test -s this only prints ['arg1'] and I
have no idea how to find out that arg0 has also been
created/requested. Is there a way to know all the requested funcargs?
Floris
More information about the Pytest-dev
mailing list