From ba62835edaa2af230122d9c104209085336b9fb2 Mon Sep 17 00:00:00 2001 From: Benjamin Schubert Date: Sat, 9 Mar 2019 15:14:41 +0000 Subject: tests:lint: fix all ungrouped imports --- tests/examples/developing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/examples/developing.py') diff --git a/tests/examples/developing.py b/tests/examples/developing.py index a5e3c2d9a..86046a0b8 100644 --- a/tests/examples/developing.py +++ b/tests/examples/developing.py @@ -1,9 +1,9 @@ import os import pytest -import tests.testutils.patch as patch from buildstream.plugintestutils import cli_integration as cli from buildstream.plugintestutils.integration import assert_contains +import tests.testutils.patch as patch from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH pytestmark = pytest.mark.integration -- cgit v1.2.1 From a90daa6a123d74a938a646e2fccaf4bfe6a5b950 Mon Sep 17 00:00:00 2001 From: Benjamin Schubert Date: Tue, 19 Mar 2019 18:05:05 +0000 Subject: tests:lint: silence redefined-outer-name in files using fixtures Pylint doesn't play well with pytest fixtures, we therefore need to silence this error. --- tests/examples/developing.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/examples/developing.py') diff --git a/tests/examples/developing.py b/tests/examples/developing.py index 86046a0b8..46f0d7f30 100644 --- a/tests/examples/developing.py +++ b/tests/examples/developing.py @@ -1,3 +1,6 @@ +# Pylint doesn't play well with fixtures and dependency injection from pytest +# pylint: disable=redefined-outer-name + import os import pytest -- cgit v1.2.1 From da439e6658049bb79ca471f4eeac401e70c548f1 Mon Sep 17 00:00:00 2001 From: Benjamin Schubert Date: Tue, 19 Mar 2019 18:36:38 +0000 Subject: tests:lint: disable 'unused-import' checks on pytest fixtures Pylint can't know that pytest's fixtures are used in a file and therefore reports false positives. Silencing all those errors --- tests/examples/developing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/examples/developing.py') diff --git a/tests/examples/developing.py b/tests/examples/developing.py index 46f0d7f30..7da97931a 100644 --- a/tests/examples/developing.py +++ b/tests/examples/developing.py @@ -4,7 +4,7 @@ import os import pytest -from buildstream.plugintestutils import cli_integration as cli +from buildstream.plugintestutils import cli_integration as cli # pylint: disable=unused-import from buildstream.plugintestutils.integration import assert_contains import tests.testutils.patch as patch from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH -- cgit v1.2.1