def pytest_fixture_setup(fixturedef, request):
 kwargs = {}
 for argname in fixturedef.argnames:
  fixdef = request._get_active_fixturedef(argname)
  (result, arg_cache_key, exc) = fixdef.cached_result
  request._check_scope(argname, request.scope, fixdef.scope)
  kwargs[argname] = result
 fixturefunc = fixturedef.func
 if fixturedef.unittest:
  if (request.instance is not None):
   fixturefunc = fixturedef.func.__get__(request.instance)
 elif (request.instance is not None):
  fixturefunc = getimfunc(fixturedef.func)
  if (fixturefunc != fixturedef.func):
   fixturefunc = fixturefunc.__get__(request.instance)
 my_cache_key = request.param_index
 try:
  result = call_fixture_func(fixturefunc, request, kwargs)
 except Exception:
  fixturedef.cached_result = (None, my_cache_key, sys.exc_info())
  raise
 fixturedef.cached_result = (result, my_cache_key, None)
 return result

def pytest_fixture_setup ( fixturedef , request ) : kwargs = { } for argname in fixturedef . argnames : fixdef = request . _get_active_fixturedef ( argname ) ( result , arg_cache_key , exc ) = fixdef . cached_result request . _check_scope ( argname , request . scope , fixdef . scope ) kwargs [ argname ] = result fixturefunc = fixturedef . func if fixturedef . unittest : if ( request . instance is not None ) : fixturefunc = fixturedef . func . __get__ ( request . instance ) elif ( request . instance is not None ) : fixturefunc = getimfunc ( fixturedef . func ) if ( fixturefunc != fixturedef . func ) : fixturefunc = fixturefunc . __get__ ( request . instance ) my_cache_key = request . param_index try : result = call_fixture_func ( fixturefunc , request , kwargs ) except Exception : fixturedef . cached_result = ( None , my_cache_key , sys . exc_info ( ) ) raise fixturedef . cached_result = ( result , my_cache_key , None ) return result
execution of fixture setup .