Formatting: Format all python code with black.
This CL is probably not what you're looking for, it's only
automated formatting. Ignore it with
`git blame --ignore-rev <revision>` for this commit.
BUG=b:233893248
TEST=CQ
Change-Id: I66591d7a738d241aed3290138c0f68065ab10a6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3879174
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Alex Klein <saklein@chromium.org>
diff --git a/scripts/cros_setup_toolchains_unittest.py b/scripts/cros_setup_toolchains_unittest.py
index 73f187a..9feb80e 100644
--- a/scripts/cros_setup_toolchains_unittest.py
+++ b/scripts/cros_setup_toolchains_unittest.py
@@ -12,27 +12,31 @@
class UtilsTest(cros_test_lib.MockTempDirTestCase):
- """Tests for various small util funcs."""
+ """Tests for various small util funcs."""
- def testFileIsCrosSdkElf(self):
- """Verify FileIsCrosSdkElf on x86_64 ELFs."""
- path = os.path.join(self.tempdir, 'file')
- data = (b'\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00'
- b'>\x00')
- osutils.WriteFile(path, data, mode='wb')
- self.assertTrue(cros_setup_toolchains.FileIsCrosSdkElf(path))
+ def testFileIsCrosSdkElf(self):
+ """Verify FileIsCrosSdkElf on x86_64 ELFs."""
+ path = os.path.join(self.tempdir, "file")
+ data = (
+ b"\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00"
+ b">\x00"
+ )
+ osutils.WriteFile(path, data, mode="wb")
+ self.assertTrue(cros_setup_toolchains.FileIsCrosSdkElf(path))
- def testArmIsNotCrosSdkElf(self):
- """Verify FileIsCrosSdkElf on aarch64 ELFs."""
- path = os.path.join(self.tempdir, 'file')
- data = (b'\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00'
- b'(\x00')
- osutils.WriteFile(path, data, mode='wb')
- self.assertFalse(cros_setup_toolchains.FileIsCrosSdkElf(path))
+ def testArmIsNotCrosSdkElf(self):
+ """Verify FileIsCrosSdkElf on aarch64 ELFs."""
+ path = os.path.join(self.tempdir, "file")
+ data = (
+ b"\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00"
+ b"(\x00"
+ )
+ osutils.WriteFile(path, data, mode="wb")
+ self.assertFalse(cros_setup_toolchains.FileIsCrosSdkElf(path))
- def testScriptIsNotCrosSdkElf(self):
- """Verify FileIsCrosSdkElf on shell scripts."""
- path = os.path.join(self.tempdir, 'file')
- data = '#!/bin/sh\necho hi\n'
- osutils.WriteFile(path, data)
- self.assertFalse(cros_setup_toolchains.FileIsCrosSdkElf(path))
+ def testScriptIsNotCrosSdkElf(self):
+ """Verify FileIsCrosSdkElf on shell scripts."""
+ path = os.path.join(self.tempdir, "file")
+ data = "#!/bin/sh\necho hi\n"
+ osutils.WriteFile(path, data)
+ self.assertFalse(cros_setup_toolchains.FileIsCrosSdkElf(path))