Prevent creation of user dirs on several tests.

Use the config_tempdir and data_tempdir fixtures for several tests that
were creation ~/.config/qute_test or ~/.local/share/qute_test.
This commit is contained in:
Ryan Roden-Corrent 2016-07-14 20:07:11 -04:00
parent a6695ea1be
commit d9b546701e
4 changed files with 7 additions and 1 deletions

View File

@ -24,6 +24,8 @@ import pytest
from qutebrowser.browser.webkit import cookies
from qutebrowser.misc import lineparser
pytestmark = pytest.mark.usefixtures('data_tmpdir')
CONFIG_ALL_COOKIES = {'content': {'cookies-accept': 'all'}}
CONFIG_NEVER_COOKIES = {'content': {'cookies-accept': 'never'}}
CONFIG_COOKIES_ENABLED = {'content': {'cookies-store': True}}

View File

@ -35,6 +35,8 @@ from qutebrowser.config.parsers import keyconf
from qutebrowser.commands import runners
from qutebrowser.utils import objreg, standarddir
pytestmark = pytest.mark.usefixtures('config_tmpdir')
class TestConfigParser:

View File

@ -33,6 +33,8 @@ from PyQt5.QtNetwork import QNetworkProxy
from qutebrowser.config import configtypes, configexc
from qutebrowser.utils import debug, utils
pytestmark = pytest.mark.usefixtures('config_tmpdir')
class Font(QFont):

View File

@ -42,7 +42,7 @@ def gen_classes():
yield member
@pytest.mark.usefixtures('qapp')
@pytest.mark.usefixtures('qapp', 'config_tmpdir')
@pytest.mark.parametrize('klass', gen_classes())
@hypothesis.given(strategies.text())
@hypothesis.example('\x00')