parent
a60e932454
commit
40ee89bddc
@ -38,7 +38,7 @@ import pytest
|
|||||||
import py.path # pylint: disable=no-name-in-module
|
import py.path # pylint: disable=no-name-in-module
|
||||||
|
|
||||||
import helpers.stubs as stubsmod
|
import helpers.stubs as stubsmod
|
||||||
from qutebrowser.config import config, configdata
|
from qutebrowser.config import config, configdata, configtypes, configexc
|
||||||
from qutebrowser.utils import objreg, standarddir
|
from qutebrowser.utils import objreg, standarddir
|
||||||
from qutebrowser.browser.webkit import cookies
|
from qutebrowser.browser.webkit import cookies
|
||||||
from qutebrowser.misc import savemanager, sql
|
from qutebrowser.misc import savemanager, sql
|
||||||
@ -218,6 +218,12 @@ def config_stub(stubs, monkeypatch, configdata_init):
|
|||||||
container = config.ConfigContainer(conf)
|
container = config.ConfigContainer(conf)
|
||||||
monkeypatch.setattr(config, 'val', container)
|
monkeypatch.setattr(config, 'val', container)
|
||||||
|
|
||||||
|
try:
|
||||||
|
configtypes.Font.monospace_fonts = container.fonts.monospace
|
||||||
|
except configexc.NoOptionError:
|
||||||
|
# Completion tests patch configdata so fonts.monospace is unavailable.
|
||||||
|
pass
|
||||||
|
|
||||||
conf.val = container # For easier use in tests
|
conf.val = container # For easier use in tests
|
||||||
return conf
|
return conf
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user