@pytest.mark.usefixtures('back_up_rc')
def test_get_user_config_invalid(user_config_path):
 shutil.copy('tests/test-config/invalid-config.yaml', user_config_path)
 with pytest.raises(InvalidConfiguration):
  config.get_user_config()

@ pytest . mark . usefixtures ( 'back_up_rc' ) def test_get_user_config_invalid ( user_config_path ) : shutil . copy ( 'tests/test-config/invalid-config.yaml' , user_config_path ) with pytest . raises ( InvalidConfiguration ) : config . get_user_config ( )
get config from an invalid ~/ .