@pytest.fixture(scope='session')
def user_config_file(user_dir, user_config_data):
 config_file = user_dir.join('config')
 config_text = USER_CONFIG.format(**user_config_data)
 config_file.write(config_text)
 return str(config_file)

@ pytest . fixture ( scope = 'session' ) def user_config_file ( user_dir , user_config_data ) : config_file = user_dir . join ( 'config' ) config_text = USER_CONFIG . format ( ** user_config_data ) config_file . write ( config_text ) return str ( config_file )
fixture that creates a config file called config in the users home directory .