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/api/compile_build_api_proto_unittest.py b/api/compile_build_api_proto_unittest.py
index a7baf8a..bc68736 100644
--- a/api/compile_build_api_proto_unittest.py
+++ b/api/compile_build_api_proto_unittest.py
@@ -12,26 +12,27 @@
def test_versions_match():
- """Verify the versions match.
+ """Verify the versions match.
- The protoc version in the compile script needs to be compatible with the
- version of the library we're using (in chromite/third_party). For now, that
- means we're checking equality.
+ The protoc version in the compile script needs to be compatible with the
+ version of the library we're using (in chromite/third_party). For now, that
+ means we're checking equality.
- TODO: Investigate whether, e.g. 1.2.0 ~= 1.2.3, and we only need to check the
- major and minor components.
- TODO: Investigate using protobuf.__version__ instead of hard coding a version
- in compile_build_api_proto.
- """
- assert compile_build_api_proto.PROTOC_VERSION == protobuf.__version__, (
- 'The protobuf library or compile_build_api_proto.PROTOC_VERSION has been '
- 'updated, but the other has not. They must be updated together.')
+ TODO: Investigate whether, e.g. 1.2.0 ~= 1.2.3, and we only need to check the
+ major and minor components.
+ TODO: Investigate using protobuf.__version__ instead of hard coding a version
+ in compile_build_api_proto.
+ """
+ assert compile_build_api_proto.PROTOC_VERSION == protobuf.__version__, (
+ "The protobuf library or compile_build_api_proto.PROTOC_VERSION has been "
+ "updated, but the other has not. They must be updated together."
+ )
def test_compiles(tmpdir):
- """Test the script successfully compiles something."""
- assert not os.listdir(tmpdir)
- compile_build_api_proto.main(['--destination', str(tmpdir)])
- # It may produce an __init__.py even if nothing else succeeded, so make sure
- # we have more than just that.
- assert len(os.listdir(tmpdir)) > 1
+ """Test the script successfully compiles something."""
+ assert not os.listdir(tmpdir)
+ compile_build_api_proto.main(["--destination", str(tmpdir)])
+ # It may produce an __init__.py even if nothing else succeeded, so make sure
+ # we have more than just that.
+ assert len(os.listdir(tmpdir)) > 1