I am using py.test and wonder if/how it is possible to retrieve the name of the currently executed test within the setup method that is invoked before running e
setup
You can also do this using the Request Fixture like this:
def test_name1(request): testname = request.node.name assert testname == 'test_name1'