@pytest.fixture
def tmpconfig(request):
 SUBFOLDER = tempfile.mkdtemp()
 CONF = UserConfig('spyder-test', defaults=DEFAULTS, version=CONF_VERSION, subfolder=SUBFOLDER, raw_mode=True)
 def fin():
  '\n        Fixture finalizer to delete the temporary CONF element.\n        '
  shutil.rmtree(SUBFOLDER)
 request.addfinalizer(fin)
 return CONF

@ pytest . fixture def tmpconfig ( request ) : SUBFOLDER = tempfile . mkdtemp ( ) CONF = UserConfig ( 'spyder-test' , defaults = DEFAULTS , version = CONF_VERSION , subfolder = SUBFOLDER , raw_mode = True ) def fin ( ) : shutil . rmtree ( SUBFOLDER ) request . addfinalizer ( fin ) return CONF
fixtures that returns a temporary conf element .