From 6447733eb28ea188d551ae518a7e51ebf63a4350 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 21 Aug 2023 21:20:32 -0400 Subject: isort: format codebase Change-Id: I6f11d123b68fd077f558d3c21349c55c5f251019 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/383715 Reviewed-by: Gavin Mak Tested-by: Mike Frysinger Commit-Queue: Mike Frysinger --- tests/test_error.py | 7 ++++--- tests/test_git_command.py | 3 ++- tests/test_git_superproject.py | 3 ++- tests/test_hooks.py | 3 ++- tests/test_project.py | 2 +- tests/test_subcmds_sync.py | 7 ++++--- tests/test_subcmds_upload.py | 3 ++- 7 files changed, 17 insertions(+), 11 deletions(-) (limited to 'tests') diff --git a/tests/test_error.py b/tests/test_error.py index 2b28f5c2..a74ed2d7 100644 --- a/tests/test_error.py +++ b/tests/test_error.py @@ -18,13 +18,14 @@ import inspect import pickle import unittest +import command import error -import project -import git_command import fetch -import command +import git_command +import project from subcmds import all_modules + imports = all_modules + [ error, project, diff --git a/tests/test_git_command.py b/tests/test_git_command.py index 3dd31b29..c803d280 100644 --- a/tests/test_git_command.py +++ b/tests/test_git_command.py @@ -14,11 +14,12 @@ """Unittests for the git_command.py module.""" -import re import os +import re import subprocess import unittest + try: from unittest import mock except ImportError: diff --git a/tests/test_git_superproject.py b/tests/test_git_superproject.py index eb542c60..f884f507 100644 --- a/tests/test_git_superproject.py +++ b/tests/test_git_superproject.py @@ -21,10 +21,11 @@ import tempfile import unittest from unittest import mock +from test_manifest_xml import sort_attributes + import git_superproject import git_trace2_event_log import manifest_xml -from test_manifest_xml import sort_attributes class SuperprojectTestCase(unittest.TestCase): diff --git a/tests/test_hooks.py b/tests/test_hooks.py index 78277128..76e928f7 100644 --- a/tests/test_hooks.py +++ b/tests/test_hooks.py @@ -14,9 +14,10 @@ """Unittests for the hooks.py module.""" -import hooks import unittest +import hooks + class RepoHookShebang(unittest.TestCase): """Check shebang parsing in RepoHook.""" diff --git a/tests/test_project.py b/tests/test_project.py index bc8330b2..79728d70 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -22,9 +22,9 @@ import tempfile import unittest import error -import manifest_xml import git_command import git_config +import manifest_xml import platform_utils import project diff --git a/tests/test_subcmds_sync.py b/tests/test_subcmds_sync.py index 71b0f8e0..b9f0a746 100644 --- a/tests/test_subcmds_sync.py +++ b/tests/test_subcmds_sync.py @@ -16,16 +16,17 @@ import os import shutil import tempfile -import unittest import time +import unittest from unittest import mock import pytest import command -from subcmds import sync +from error import GitError +from error import RepoExitError from project import SyncNetworkHalfResult -from error import GitError, RepoExitError +from subcmds import sync @pytest.mark.parametrize( diff --git a/tests/test_subcmds_upload.py b/tests/test_subcmds_upload.py index 75811996..cd888977 100644 --- a/tests/test_subcmds_upload.py +++ b/tests/test_subcmds_upload.py @@ -17,8 +17,9 @@ import unittest from unittest import mock +from error import GitError +from error import UploadError from subcmds import upload -from error import UploadError, GitError class UnexpectedError(Exception): -- cgit v1.2.3-54-g00ecf