From 5817b47f757175a802e1cb628b64ce462a11405a Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 1 Dec 2015 22:45:59 +0100 Subject: [PATCH] Revert "Use fully qualified imports in tests." Seems like this also breaks frozen tests... This reverts commit c7fdcc92b8d30b2317979a402518c82d4f25413b. --- tests/conftest.py | 8 ++++---- tests/helpers/test_helper_utils.py | 2 +- tests/integration/conftest.py | 4 ++-- tests/integration/features/conftest.py | 2 +- tests/integration/features/test_caret.py | 4 ++-- tests/integration/features/test_urlmarks.py | 2 +- tests/integration/quteprocess.py | 2 +- tests/integration/test_quteprocess.py | 4 ++-- tests/integration/test_testprocess.py | 2 +- tests/integration/testprocess.py | 2 +- tests/integration/webserver.py | 2 +- tests/unit/misc/test_ipc.py | 2 +- tests/unit/utils/test_qtutils.py | 2 +- 13 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index b5b5fde36..9fd73fe73 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -31,10 +31,10 @@ import warnings import pytest -import tests.helpers.stubs as stubsmod -from tests.helpers import logfail -from tests.helpers.logfail import fail_on_logging -from tests.helpers.messagemock import message_mock +import helpers.stubs as stubsmod +from helpers import logfail +from helpers.logfail import fail_on_logging +from helpers.messagemock import message_mock from qutebrowser.config import config from qutebrowser.utils import objreg diff --git a/tests/helpers/test_helper_utils.py b/tests/helpers/test_helper_utils.py index 44944049e..6311c08e7 100644 --- a/tests/helpers/test_helper_utils.py +++ b/tests/helpers/test_helper_utils.py @@ -20,7 +20,7 @@ import pytest -from tests.helpers import utils +from helpers import utils # pylint: disable=import-error @pytest.mark.parametrize('val1, val2', [ diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 3cd902f9b..2cf649408 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -21,5 +21,5 @@ """Things needed for integration testing.""" -from tests.integration.webserver import httpbin, httpbin_after_test -from tests.integration.quteprocess import quteproc_process, quteproc +from webserver import httpbin, httpbin_after_test +from quteprocess import quteproc_process, quteproc diff --git a/tests/integration/features/conftest.py b/tests/integration/features/conftest.py index 1f31e3f94..3e9b6f0ba 100644 --- a/tests/integration/features/conftest.py +++ b/tests/integration/features/conftest.py @@ -33,7 +33,7 @@ import yaml import pytest_bdd as bdd from PyQt5.QtGui import QClipboard -from tests.helpers import utils +from helpers import utils # pylint: disable=import-error def _clipboard_mode(qapp, what): diff --git a/tests/integration/features/test_caret.py b/tests/integration/features/test_caret.py index c296d01fe..1f59455d1 100644 --- a/tests/integration/features/test_caret.py +++ b/tests/integration/features/test_caret.py @@ -21,8 +21,8 @@ import pytest import pytest_bdd as bdd -# pylint: disable=unused-import,line-too-long -from tests.integration.features.test_yankpaste import skip_with_broken_clipboard +# pylint: disable=unused-import +from test_yankpaste import skip_with_broken_clipboard # https://github.com/The-Compiler/qutebrowser/issues/1124#issuecomment-158073581 diff --git a/tests/integration/features/test_urlmarks.py b/tests/integration/features/test_urlmarks.py index 8f7205240..14a450e7f 100644 --- a/tests/integration/features/test_urlmarks.py +++ b/tests/integration/features/test_urlmarks.py @@ -21,7 +21,7 @@ import os.path import pytest_bdd as bdd -from tests.helpers import utils +from helpers import utils # pylint: disable=import-error bdd.scenarios('urlmarks.feature') diff --git a/tests/integration/quteprocess.py b/tests/integration/quteprocess.py index b15b138a4..e72d1dd9c 100644 --- a/tests/integration/quteprocess.py +++ b/tests/integration/quteprocess.py @@ -32,7 +32,7 @@ import yaml import pytest from PyQt5.QtCore import pyqtSignal, QUrl -from tests.integration import testprocess +import testprocess # pylint: disable=import-error from qutebrowser.misc import ipc from qutebrowser.utils import log, utils diff --git a/tests/integration/test_quteprocess.py b/tests/integration/test_quteprocess.py index 0d7c0afb2..778c062a3 100644 --- a/tests/integration/test_quteprocess.py +++ b/tests/integration/test_quteprocess.py @@ -24,8 +24,8 @@ import datetime import pytest -from tests.integration import quteprocess -from tests.integration import testprocess +import quteprocess +import testprocess from qutebrowser.utils import log diff --git a/tests/integration/test_testprocess.py b/tests/integration/test_testprocess.py index 9b521efb1..9c10923af 100644 --- a/tests/integration/test_testprocess.py +++ b/tests/integration/test_testprocess.py @@ -27,7 +27,7 @@ import datetime import pytest from PyQt5.QtCore import QProcess -from tests.integration import testprocess +import testprocess pytestmark = [pytest.mark.not_frozen] diff --git a/tests/integration/testprocess.py b/tests/integration/testprocess.py index 6b7a29bde..c641aa9a1 100644 --- a/tests/integration/testprocess.py +++ b/tests/integration/testprocess.py @@ -27,7 +27,7 @@ import pytestqt.plugin from PyQt5.QtCore import pyqtSlot, pyqtSignal, QProcess, QObject, QElapsedTimer from PyQt5.QtTest import QSignalSpy -from tests.helpers import utils +from helpers import utils # pylint: disable=import-error class InvalidLine(Exception): diff --git a/tests/integration/webserver.py b/tests/integration/webserver.py index 350f448f8..3848ab902 100644 --- a/tests/integration/webserver.py +++ b/tests/integration/webserver.py @@ -27,7 +27,7 @@ import os.path import pytest from PyQt5.QtCore import pyqtSignal -from tests.integration import testprocess +import testprocess # pylint: disable=import-error class Request(testprocess.Line): diff --git a/tests/unit/misc/test_ipc.py b/tests/unit/misc/test_ipc.py index 3ac693a82..62247ca14 100644 --- a/tests/unit/misc/test_ipc.py +++ b/tests/unit/misc/test_ipc.py @@ -39,7 +39,7 @@ from PyQt5.QtTest import QSignalSpy import qutebrowser from qutebrowser.misc import ipc from qutebrowser.utils import objreg, qtutils -from tests.helpers import stubs +from helpers import stubs # pylint: disable=import-error Args = collections.namedtuple('Args', 'basedir') diff --git a/tests/unit/utils/test_qtutils.py b/tests/unit/utils/test_qtutils.py index 6a3a99c5f..7653ef61d 100644 --- a/tests/unit/utils/test_qtutils.py +++ b/tests/unit/utils/test_qtutils.py @@ -38,7 +38,7 @@ from PyQt5.QtCore import (QDataStream, QPoint, QUrl, QByteArray, QIODevice, from qutebrowser import qutebrowser from qutebrowser.utils import qtutils -from tests.unit.utils import overflow_test_cases +import overflow_test_cases @pytest.mark.parametrize('qversion, version, op, expected', [