@pytest.yield_fixture()
def manager(request, config, caplog, monkeypatch, filecopy):
 if (u'tmpdir' in request.fixturenames):
  config = config.replace(u'__tmp__', request.getfuncargvalue(u'tmpdir').strpath)
 try:
  mockmanager = MockManager(config, request.cls.__name__)
 except Exception:
  print caplog.text()
  raise
 (yield mockmanager)
 mockmanager.shutdown()

@ pytest . yield_fixture ( ) def manager ( request , config , caplog , monkeypatch , filecopy ) : if ( u'tmpdir' in request . fixturenames ) : config = config . replace ( u'__tmp__' , request . getfuncargvalue ( u'tmpdir' ) . strpath ) try : mockmanager = MockManager ( config , request . cls . __name__ ) except Exception : print caplog . text ( ) raise ( yield mockmanager ) mockmanager . shutdown ( )
create a :class:mockmanager for this test based on config argument .