@pytest.fixture
def config_tmpdir(monkeypatch, tmpdir):
 confdir = (tmpdir / 'config')
 path = str(confdir)
 os.mkdir(path)
 monkeypatch.setattr('qutebrowser.utils.standarddir.config', (lambda : path))
 return confdir

@ pytest . fixture def config_tmpdir ( monkeypatch , tmpdir ) : confdir = ( tmpdir / 'config' ) path = str ( confdir ) os . mkdir ( path ) monkeypatch . setattr ( 'qutebrowser.utils.standarddir.config' , ( lambda : path ) ) return confdir
set tmpdir/config as the configdir .