summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-06-05 18:49:58 +0100
committerBenjamin Schubert <ben.c.schubert@gmail.com>2019-06-05 18:49:58 +0100
commit62237248b7c5e60643c172a4967da16f021b779c (patch)
treeeee4b5faa1508635dbbec0a7dda138d75e4542fa
parentbf8c33a1d5389e5f2e2869052a7a5c5e0d829e17 (diff)
downloadbuildstream-62237248b7c5e60643c172a4967da16f021b779c.tar.gz
tests/sandboxes: Enable pylint and fix problems
tests/sandboxes was missing an __init__.py, which meant pylint was never run there.
-rw-r--r--tests/sandboxes/__init__.py0
-rw-r--r--tests/sandboxes/missing-command.py5
-rw-r--r--tests/sandboxes/missing_dependencies.py8
-rw-r--r--tests/sandboxes/remote-exec-config.py8
4 files changed, 15 insertions, 6 deletions
diff --git a/tests/sandboxes/__init__.py b/tests/sandboxes/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/sandboxes/__init__.py
diff --git a/tests/sandboxes/missing-command.py b/tests/sandboxes/missing-command.py
index 8156eac9b..0277389a9 100644
--- a/tests/sandboxes/missing-command.py
+++ b/tests/sandboxes/missing-command.py
@@ -1,9 +1,12 @@
+# Pylint doesn't play well with fixtures and dependency injection from pytest
+# pylint: disable=redefined-outer-name
+
import os
import pytest
from buildstream._exceptions import ErrorDomain
-from buildstream.testing import cli
+from buildstream.testing import cli # pylint: disable=unused-import
DATA_DIR = os.path.join(
diff --git a/tests/sandboxes/missing_dependencies.py b/tests/sandboxes/missing_dependencies.py
index 22fecaa6e..1f2a50422 100644
--- a/tests/sandboxes/missing_dependencies.py
+++ b/tests/sandboxes/missing_dependencies.py
@@ -1,11 +1,15 @@
+# Pylint doesn't play well with fixtures and dependency injection from pytest
+# pylint: disable=redefined-outer-name
+
import os
+
import pytest
-from buildstream.testing import cli
-from tests.testutils.site import IS_LINUX
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain
+from buildstream.testing import cli # pylint: disable=unused-import
+from tests.testutils.site import IS_LINUX
# Project directory
DATA_DIR = os.path.join(
diff --git a/tests/sandboxes/remote-exec-config.py b/tests/sandboxes/remote-exec-config.py
index 82943e4b1..90418d6fc 100644
--- a/tests/sandboxes/remote-exec-config.py
+++ b/tests/sandboxes/remote-exec-config.py
@@ -1,11 +1,13 @@
-import pytest
+# Pylint doesn't play well with fixtures and dependency injection from pytest
+# pylint: disable=redefined-outer-name
import os
+import pytest
+
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
-
-from buildstream.testing.runcli import cli
+from buildstream.testing.runcli import cli # pylint: disable=unused-import
DATA_DIR = os.path.join(
os.path.dirname(os.path.realpath(__file__)),