diff options
author | Jordan R Abrahams-Whitehead <ajordanr@google.com> | 2022-03-04 20:26:01 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-03-05 04:57:58 +0000 |
commit | d2b64f8ce4424f30a8cc268c1cfbd0f71d2631e3 (patch) | |
tree | cb8bb97d1582aecec764609f209aed7408538f4e /llvm_tools/auto_llvm_bisection_unittest.py | |
parent | a7acc255400f3acb21922d5e6aff048ccba75df0 (diff) | |
download | toolchain-utils-d2b64f8ce4424f30a8cc268c1cfbd0f71d2631e3.tar.gz |
llvm_tools: Reformat all python llvm_tools
This CL runs `yapf` from inside the chroot for
all python files in llvm_tools, except
revert_checker.py, which comes from upstream
LLVM.
Also manually fixes some cros_lint backslash
errors.
BUG=None
TEST=Presubmit checks
Change-Id: I5f81fbdbbf954fe9ec591e641844f4ef3c17b73b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3503393
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Diffstat (limited to 'llvm_tools/auto_llvm_bisection_unittest.py')
-rwxr-xr-x | llvm_tools/auto_llvm_bisection_unittest.py | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/llvm_tools/auto_llvm_bisection_unittest.py b/llvm_tools/auto_llvm_bisection_unittest.py index 07c0e715..3f7e821b 100755 --- a/llvm_tools/auto_llvm_bisection_unittest.py +++ b/llvm_tools/auto_llvm_bisection_unittest.py @@ -27,10 +27,9 @@ class AutoLLVMBisectionTest(unittest.TestCase): """Unittests for auto bisection of LLVM.""" @mock.patch.object(chroot, 'VerifyOutsideChroot', return_value=True) - @mock.patch.object( - llvm_bisection, - 'GetCommandLineArgs', - return_value=test_helpers.ArgsOutputTest()) + @mock.patch.object(llvm_bisection, + 'GetCommandLineArgs', + return_value=test_helpers.ArgsOutputTest()) @mock.patch.object(time, 'sleep') @mock.patch.object(traceback, 'print_exc') @mock.patch.object(llvm_bisection, 'main') @@ -62,9 +61,9 @@ class AutoLLVMBisectionTest(unittest.TestCase): ] mock_json_load.return_value = { 'start': - 369410, + 369410, 'end': - 369420, + 369420, 'jobs': [{ 'buildbucket_id': 12345, 'rev': 369411, @@ -93,10 +92,9 @@ class AutoLLVMBisectionTest(unittest.TestCase): @mock.patch.object(traceback, 'print_exc') @mock.patch.object(llvm_bisection, 'main') @mock.patch.object(os.path, 'isfile') - @mock.patch.object( - llvm_bisection, - 'GetCommandLineArgs', - return_value=test_helpers.ArgsOutputTest()) + @mock.patch.object(llvm_bisection, + 'GetCommandLineArgs', + return_value=test_helpers.ArgsOutputTest()) def testFailedToStartBisection(self, mock_get_args, mock_isfile, mock_llvm_bisection, mock_traceback, mock_sleep, mock_outside_chroot): @@ -121,10 +119,9 @@ class AutoLLVMBisectionTest(unittest.TestCase): self.assertEqual(mock_sleep.call_count, 2) @mock.patch.object(chroot, 'VerifyOutsideChroot', return_value=True) - @mock.patch.object( - llvm_bisection, - 'GetCommandLineArgs', - return_value=test_helpers.ArgsOutputTest()) + @mock.patch.object(llvm_bisection, + 'GetCommandLineArgs', + return_value=test_helpers.ArgsOutputTest()) @mock.patch.object(time, 'time') @mock.patch.object(time, 'sleep') @mock.patch.object(os.path, 'isfile') @@ -154,9 +151,9 @@ class AutoLLVMBisectionTest(unittest.TestCase): mock_isfile.return_value = True mock_json_load.return_value = { 'start': - 369410, + 369410, 'end': - 369420, + 369420, 'jobs': [{ 'buildbucket_id': 12345, 'rev': 369411, @@ -235,8 +232,8 @@ class AutoLLVMBisectionTest(unittest.TestCase): auto_llvm_bisection.GetBuildResult(chroot_path, buildbucket_id) self.assertEqual( - str(err.exception), - '"cros buildresult" return value is invalid: %s' % invalid_build_status) + str(err.exception), '"cros buildresult" return value is invalid: %s' % + invalid_build_status) mock_chroot_command.assert_called_once_with( [ |