@pytest.fixture(scope='session')
def tmpdir_factory(request):
 return request.config._tmpdirhandler

@ pytest . fixture ( scope = 'session' ) def tmpdir_factory ( request ) : return request . config . _tmpdirhandler
return a tempdirfactory instance for the test session .