diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2021-07-02 11:36:05 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-02 23:36:41 +0000 |
commit | 4d2c524af57e22adc2b57fed5555980cef6ed49a (patch) | |
tree | 0aa3ca3fb6a41cc4269b59e974a7fa6f62f5ee2c /zephyr/zmake/tests | |
parent | 65b8e9a2a37b91c47e22151c9438b121d7b02558 (diff) | |
download | chrome-ec-4d2c524af57e22adc2b57fed5555980cef6ed49a.tar.gz |
zephyr: zmake: Run isort on all files, add check to run_tests.sh
Run isort on all files, and enforce future formatting checks by
putting in run_tests.sh.
BUG=b:192389533
BRANCH=none
TEST=run_tests.sh
Cq-Depend: chromium:3003455
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I5795ffae30b88fe3a5f093ab7a0d8cd9389da285
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3002838
Reviewed-by: Yuval Peress <peress@chromium.org>
Diffstat (limited to 'zephyr/zmake/tests')
-rw-r--r-- | zephyr/zmake/tests/test_build_config.py | 7 | ||||
-rw-r--r-- | zephyr/zmake/tests/test_modules.py | 4 | ||||
-rw-r--r-- | zephyr/zmake/tests/test_multiproc_logging.py | 2 | ||||
-rw-r--r-- | zephyr/zmake/tests/test_packers.py | 7 | ||||
-rw-r--r-- | zephyr/zmake/tests/test_print_versions.py | 1 | ||||
-rw-r--r-- | zephyr/zmake/tests/test_project.py | 8 | ||||
-rw-r--r-- | zephyr/zmake/tests/test_toolchains.py | 2 | ||||
-rw-r--r-- | zephyr/zmake/tests/test_util.py | 6 | ||||
-rw-r--r-- | zephyr/zmake/tests/test_zmake.py | 3 |
9 files changed, 23 insertions, 17 deletions
diff --git a/zephyr/zmake/tests/test_build_config.py b/zephyr/zmake/tests/test_build_config.py index 8f60f6dcf8..5eb72eb058 100644 --- a/zephyr/zmake/tests/test_build_config.py +++ b/zephyr/zmake/tests/test_build_config.py @@ -3,14 +3,15 @@ # found in the LICENSE file. import argparse -import hypothesis -import hypothesis.strategies as st import os import pathlib -import pytest import string import tempfile +import hypothesis +import hypothesis.strategies as st +import pytest + import zmake.jobserver import zmake.util as util from zmake.build_config import BuildConfig diff --git a/zephyr/zmake/tests/test_modules.py b/zephyr/zmake/tests/test_modules.py index 6fa7a38b24..2c934628f6 100644 --- a/zephyr/zmake/tests/test_modules.py +++ b/zephyr/zmake/tests/test_modules.py @@ -2,14 +2,14 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import pathlib import tempfile + import hypothesis import hypothesis.strategies as st -import pathlib import zmake.modules - module_lists = st.lists(st.one_of(*map(st.just, zmake.modules.known_modules)), unique=True) diff --git a/zephyr/zmake/tests/test_multiproc_logging.py b/zephyr/zmake/tests/test_multiproc_logging.py index a50e5161b9..11fef0be97 100644 --- a/zephyr/zmake/tests/test_multiproc_logging.py +++ b/zephyr/zmake/tests/test_multiproc_logging.py @@ -4,8 +4,8 @@ import io import logging import os -import unittest.mock as mock import threading +import unittest.mock as mock import zmake.multiproc diff --git a/zephyr/zmake/tests/test_packers.py b/zephyr/zmake/tests/test_packers.py index 21361a925f..34b256bce6 100644 --- a/zephyr/zmake/tests/test_packers.py +++ b/zephyr/zmake/tests/test_packers.py @@ -2,13 +2,14 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import hypothesis -import hypothesis.strategies as st import pathlib -import pytest import tempfile import unittest.mock as mock +import hypothesis +import hypothesis.strategies as st +import pytest + import zmake.output_packers as packers # Strategies for use with hypothesis diff --git a/zephyr/zmake/tests/test_print_versions.py b/zephyr/zmake/tests/test_print_versions.py index 0e7df2f3a0..68abe79c43 100644 --- a/zephyr/zmake/tests/test_print_versions.py +++ b/zephyr/zmake/tests/test_print_versions.py @@ -4,6 +4,7 @@ import pathlib import tempfile + import zmake.zmake as zm diff --git a/zephyr/zmake/tests/test_project.py b/zephyr/zmake/tests/test_project.py index 732e397354..3279d6ce31 100644 --- a/zephyr/zmake/tests/test_project.py +++ b/zephyr/zmake/tests/test_project.py @@ -2,17 +2,17 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import hypothesis -import hypothesis.strategies as st import pathlib -import pytest import string import tempfile +import hypothesis +import hypothesis.strategies as st +import pytest + import zmake.modules import zmake.project - board_names = st.text(alphabet=set(string.ascii_lowercase) | {'_'}, min_size=1) sets_of_board_names = st.lists(st.lists(board_names, unique=True)) diff --git a/zephyr/zmake/tests/test_toolchains.py b/zephyr/zmake/tests/test_toolchains.py index 5ad9a8e159..d5549faebf 100644 --- a/zephyr/zmake/tests/test_toolchains.py +++ b/zephyr/zmake/tests/test_toolchains.py @@ -3,7 +3,9 @@ # found in the LICENSE file. import pathlib + import mock + import zmake.toolchains as toolchains diff --git a/zephyr/zmake/tests/test_util.py b/zephyr/zmake/tests/test_util.py index b656b1318f..258694d890 100644 --- a/zephyr/zmake/tests/test_util.py +++ b/zephyr/zmake/tests/test_util.py @@ -2,15 +2,15 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import pathlib +import tempfile + import hypothesis import hypothesis.strategies as st -import pathlib import pytest -import tempfile import zmake.util as util - # Strategies for use with hypothesis relative_path = st.from_regex(regex=r"\A\w+[\w/]*\Z") diff --git a/zephyr/zmake/tests/test_zmake.py b/zephyr/zmake/tests/test_zmake.py index 816278e46a..f037ab82f8 100644 --- a/zephyr/zmake/tests/test_zmake.py +++ b/zephyr/zmake/tests/test_zmake.py @@ -13,12 +13,13 @@ import unittest import unittest.mock as mock from unittest.mock import patch +from testfixtures import LogCapture + import zmake.build_config import zmake.jobserver import zmake.multiproc as multiproc import zmake.project import zmake.zmake as zm -from testfixtures import LogCapture OUR_PATH = os.path.dirname(os.path.realpath(__file__)) |