Rename shadowed tmpdir variable
This commit is contained in:
parent
5f2dc53d94
commit
a1c4e6e2cf
@ -414,11 +414,11 @@ def config_tmpdir(monkeypatch, tmpdir):
|
|||||||
|
|
||||||
Use this to avoid creating a 'real' config dir (~/.config/qute_test).
|
Use this to avoid creating a 'real' config dir (~/.config/qute_test).
|
||||||
"""
|
"""
|
||||||
tmpdir = tmpdir / 'config'
|
confdir = tmpdir / 'config'
|
||||||
path = str(tmpdir)
|
path = str(confdir)
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
monkeypatch.setattr('qutebrowser.utils.standarddir.config', lambda: path)
|
monkeypatch.setattr('qutebrowser.utils.standarddir.config', lambda: path)
|
||||||
return tmpdir
|
return confdir
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
@ -427,11 +427,11 @@ def data_tmpdir(monkeypatch, tmpdir):
|
|||||||
|
|
||||||
Use this to avoid creating a 'real' data dir (~/.local/share/qute_test).
|
Use this to avoid creating a 'real' data dir (~/.local/share/qute_test).
|
||||||
"""
|
"""
|
||||||
tmpdir = tmpdir / 'data'
|
datadir = tmpdir / 'data'
|
||||||
path = str(tmpdir)
|
path = str(datadir)
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
monkeypatch.setattr('qutebrowser.utils.standarddir.data', lambda: path)
|
monkeypatch.setattr('qutebrowser.utils.standarddir.data', lambda: path)
|
||||||
return tmpdir
|
return datadir
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
Loading…
Reference in New Issue
Block a user