diff options
author | Florian Bruhin <me@the-compiler.org> | 2022-02-11 13:12:43 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2022-02-11 13:12:43 +0100 |
commit | 9c4169c7b7d96a10012a72c70fc38c6154f7481f (patch) | |
tree | e05338237a42289ebb9b491ddab0f84cbf8a00be | |
parent | 02e23ef1240f3f4093b94bf3d67d1057085c28b1 (diff) | |
download | qutebrowser-9c4169c7b7d96a10012a72c70fc38c6154f7481f.tar.gz qutebrowser-9c4169c7b7d96a10012a72c70fc38c6154f7481f.zip |
tests: Remove some unused imports
-rw-r--r-- | tests/conftest.py | 16 | ||||
-rw-r--r-- | tests/end2end/conftest.py | 6 |
2 files changed, 10 insertions, 12 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 26cc04345..ad82b4f24 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -17,31 +17,29 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. -# pylint: disable=unused-import,wildcard-import,unused-wildcard-import - """The qutebrowser test suite conftest file.""" import os import pathlib import sys -import warnings import pytest import hypothesis -from PyQt5.QtCore import PYQT_VERSION pytest.register_assert_rewrite('helpers') +# pylint: disable=wildcard-import,unused-import,unused-wildcard-import from helpers import logfail from helpers.logfail import fail_on_logging from helpers.messagemock import message_mock from helpers.fixtures import * # noqa: F403 +# pylint: enable=wildcard-import,unused-import,unused-wildcard-import from helpers import testutils -from qutebrowser.utils import qtutils, standarddir, usertypes, utils, version +from qutebrowser.utils import usertypes, utils, version from qutebrowser.misc import objects, earlyinit -from qutebrowser.qt import sip -import qutebrowser.app # To register commands +# To register commands +import qutebrowser.app # pylint: disable=unused-import _qute_scheme_handler = None @@ -251,6 +249,7 @@ def _select_backend(config): backend = backend_arg or backend_env or _auto_select_backend() # Fail early if selected backend is not available + # pylint: disable=unused-import if backend == 'webkit': import PyQt5.QtWebKitWidgets elif backend == 'webengine': @@ -262,6 +261,7 @@ def _select_backend(config): def _auto_select_backend(): + # pylint: disable=unused-import try: # Try to use QtWebKit as the default backend import PyQt5.QtWebKitWidgets @@ -339,7 +339,7 @@ def check_yaml_c_exts(): https://github.com/yaml/pyyaml/issues/416 """ if testutils.ON_CI and sys.version_info[:2] != (3, 10): - from yaml import CLoader + from yaml import CLoader # pylint: disable=unused-import @pytest.hookimpl(tryfirst=True, hookwrapper=True) diff --git a/tests/end2end/conftest.py b/tests/end2end/conftest.py index 16170d460..1d9802049 100644 --- a/tests/end2end/conftest.py +++ b/tests/end2end/conftest.py @@ -17,12 +17,9 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. -# pylint: disable=unused-import - """Things needed for end2end testing.""" import re -import os import pathlib import sys import shutil @@ -34,13 +31,14 @@ from PyQt5.QtCore import PYQT_VERSION, QCoreApplication pytest.register_assert_rewrite('end2end.fixtures') +# pylint: disable=unused-import from end2end.fixtures.notificationserver import notification_server from end2end.fixtures.webserver import server, server_per_test, server2, ssl_server from end2end.fixtures.quteprocess import (quteproc_process, quteproc, quteproc_new) from end2end.fixtures.testprocess import pytest_runtest_makereport +# pylint: enable=unused-import from qutebrowser.utils import qtutils, utils -from qutebrowser.browser.webengine import spell def pytest_configure(config): |