Import qutebrowser.app in conftest
This commit is contained in:
parent
b42265212b
commit
9dfe4429d7
@ -37,6 +37,8 @@ from helpers.messagemock import message_mock
|
||||
from helpers.fixtures import *
|
||||
from qutebrowser.utils import qtutils
|
||||
|
||||
import qutebrowser.app # To register commands
|
||||
|
||||
|
||||
# Set hypothesis settings
|
||||
hypothesis.settings.register_profile('default',
|
||||
|
@ -197,8 +197,6 @@ def _generate_cmdline_tests():
|
||||
@pytest.fixture(params=_generate_cmdline_tests(), ids=lambda e: e.cmd)
|
||||
def cmdline_test(request):
|
||||
"""Fixture which generates tests for things validating commandlines."""
|
||||
# Import qutebrowser.app so all cmdutils.register decorators get run.
|
||||
import qutebrowser.app # pylint: disable=unused-variable
|
||||
return request.param
|
||||
|
||||
|
||||
|
@ -25,7 +25,6 @@ import pytest
|
||||
from PyQt5.QtCore import QObject, QUrl
|
||||
from PyQt5.QtGui import QColor
|
||||
|
||||
import qutebrowser.app # To register commands
|
||||
from qutebrowser.commands import cmdexc
|
||||
from qutebrowser.config import config, configdata, configexc, configfiles
|
||||
from qutebrowser.utils import objreg, usertypes
|
||||
|
@ -1057,7 +1057,6 @@ class TestCommand:
|
||||
|
||||
def test_cmdline(self, klass, cmdline_test):
|
||||
"""Test some commandlines from the cmdline_test fixture."""
|
||||
import qutebrowser.app # to run decorators
|
||||
typ = klass()
|
||||
if cmdline_test.valid:
|
||||
typ.to_py(cmdline_test.cmd)
|
||||
|
@ -23,7 +23,6 @@ from unittest import mock
|
||||
|
||||
import pytest
|
||||
|
||||
import qutebrowser.app # to run decorators
|
||||
from qutebrowser.utils import objreg
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user