diff --git a/tests/helpers/test_helper_utils.py b/tests/helpers/test_helper_utils.py index 9a9ff0111..7893d25ab 100644 --- a/tests/helpers/test_helper_utils.py +++ b/tests/helpers/test_helper_utils.py @@ -20,7 +20,7 @@ import pytest -from helpers import utils +from helpers import utils # pylint: disable=import-error @pytest.mark.parametrize('val1, val2', [ diff --git a/tests/helpers/utils.py b/tests/helpers/utils.py index bca8f7c08..7af219d77 100644 --- a/tests/helpers/utils.py +++ b/tests/helpers/utils.py @@ -57,7 +57,7 @@ def partial_compare(val1, val2): if val2 is Ellipsis: print("Ignoring ellipsis comparison") return True - elif type(val1) != type(val2): + elif type(val1) != type(val2): # pylint: disable=unidiomatic-typecheck print("Different types ({}, {}) -> False".format( type(val1), type(val2))) return False diff --git a/tests/integration/features/conftest.py b/tests/integration/features/conftest.py index 722537b32..8a78f72b2 100644 --- a/tests/integration/features/conftest.py +++ b/tests/integration/features/conftest.py @@ -1,10 +1,31 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: + +# Copyright 2015 Florian Bruhin (The Compiler) +# +# This file is part of qutebrowser. +# +# qutebrowser is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# qutebrowser is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with qutebrowser. If not, see . + +"""Steps for bdd-like tests.""" + import re import logging import yaml import pytest_bdd as bdd -from helpers import utils +from helpers import utils # pylint: disable=import-error @bdd.given(bdd.parsers.parse("I set {sect} -> {opt} to {value}")) @@ -69,7 +90,7 @@ def compare_session(quteproc, tmpdir, expected): # Translate ... to ellipsis in YAML. loader = yaml.SafeLoader(expected) loader.add_constructor('!ellipsis', lambda loader, node: ...) - loader.add_implicit_resolver('!ellipsis', re.compile('\.\.\.'), None) + loader.add_implicit_resolver('!ellipsis', re.compile(r'\.\.\.'), None) data = yaml.load(session.read()) expected = loader.get_data()