diff options
author | Chandan Singh <csingh43@bloomberg.net> | 2019-04-30 22:44:16 +0100 |
---|---|---|
committer | Chandan Singh <csingh43@bloomberg.net> | 2019-05-21 12:41:18 +0100 |
commit | 24139044a1b77c72d5edf2ac19ce76f549114b03 (patch) | |
tree | 9fe399d9f9973a1403b3b6c3a126e4f04b7a4089 | |
parent | 070d053e5cc47e572e9f9e647315082bd7a15c63 (diff) | |
download | buildstream-24139044a1b77c72d5edf2ac19ce76f549114b03.tar.gz |
tests: Fix import order of buildstream and tests modules
Now that the `buildstream` module is inside `src` directory, `pylint`
treats `buildstream` as a third party module inside `tests`. As such, it
wants the imports from `buildstream` to be placed before imports from
`tests`. Adopt this style to fix the lint errors, which is probably also
good for readability.
-rw-r--r-- | tests/frontend/buildcheckout.py | 6 | ||||
-rw-r--r-- | tests/frontend/fetch.py | 3 | ||||
-rw-r--r-- | tests/frontend/show.py | 3 | ||||
-rw-r--r-- | tests/frontend/workspace.py | 4 |
4 files changed, 9 insertions, 7 deletions
diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py index b181e29bb..835f084cf 100644 --- a/tests/frontend/buildcheckout.py +++ b/tests/frontend/buildcheckout.py @@ -8,13 +8,13 @@ import subprocess import pytest -from tests.testutils.site import IS_WINDOWS -from tests.testutils import generate_junction, yaml_file_get_provenance - from buildstream.testing import cli # pylint: disable=unused-import from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason +from tests.testutils.site import IS_WINDOWS +from tests.testutils import generate_junction, yaml_file_get_provenance + from . import configure_project # Project directory diff --git a/tests/frontend/fetch.py b/tests/frontend/fetch.py index 9e7a55ad9..f470ce2b7 100644 --- a/tests/frontend/fetch.py +++ b/tests/frontend/fetch.py @@ -4,12 +4,13 @@ import os import pytest -from tests.testutils import generate_junction, yaml_file_get_provenance from buildstream.testing import create_repo from buildstream.testing import cli # pylint: disable=unused-import from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason +from tests.testutils import generate_junction, yaml_file_get_provenance + from . import configure_project # Project directory diff --git a/tests/frontend/show.py b/tests/frontend/show.py index 5acb99392..ef321fd79 100644 --- a/tests/frontend/show.py +++ b/tests/frontend/show.py @@ -6,11 +6,12 @@ import sys import shutil import itertools import pytest -from tests.testutils import generate_junction, yaml_file_get_provenance from buildstream.testing import cli # pylint: disable=unused-import from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason +from tests.testutils import generate_junction, yaml_file_get_provenance + from . import configure_project # Project directory diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py index 0f5d73db8..82c24b7ad 100644 --- a/tests/frontend/workspace.py +++ b/tests/frontend/workspace.py @@ -34,14 +34,14 @@ import subprocess import pytest -from tests.testutils import create_artifact_share, create_element_size, wait_for_cache_granularity - from buildstream.testing import create_repo, ALL_REPO_KINDS from buildstream.testing import cli # pylint: disable=unused-import from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason from buildstream._workspaces import BST_WORKSPACE_FORMAT_VERSION +from tests.testutils import create_artifact_share, create_element_size, wait_for_cache_granularity + repo_kinds = [(kind) for kind in ALL_REPO_KINDS] # Project directory |