From 49ff9d5a7c40ca7db27820f67cc5c26a9dc65de9 Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Thu, 23 Mar 2023 10:58:13 +0100 Subject: [PATCH] pep8 --- capa/render/proto/__init__.py | 1 + tests/test_proto.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/capa/render/proto/__init__.py b/capa/render/proto/__init__.py index d8c3efd4..c937f8de 100644 --- a/capa/render/proto/__init__.py +++ b/capa/render/proto/__init__.py @@ -744,5 +744,6 @@ def main(argv=None): print(proto_doc) + if __name__ == "__main__": main() diff --git a/tests/test_proto.py b/tests/test_proto.py index ab0b7ed3..64c950bc 100644 --- a/tests/test_proto.py +++ b/tests/test_proto.py @@ -319,14 +319,18 @@ def assert_round_trip(doc: rd.ResultDocument): # which works thanks to pydantic model equality. assert one == two # second by showing their protobuf representations are the same. - assert capa.render.proto.doc_to_pb2(one).SerializeToString(deterministic=True) == capa.render.proto.doc_to_pb2(two).SerializeToString(deterministic=True) + assert capa.render.proto.doc_to_pb2(one).SerializeToString(deterministic=True) == capa.render.proto.doc_to_pb2( + two + ).SerializeToString(deterministic=True) # now show that two different versions are not equal. three = copy.deepcopy(two) three.meta.__dict__.update({"version": "0.0.0"}) assert one.meta.version != three.meta.version assert one != three - assert capa.render.proto.doc_to_pb2(one).SerializeToString(deterministic=True) != capa.render.proto.doc_to_pb2(three).SerializeToString(deterministic=True) + assert capa.render.proto.doc_to_pb2(one).SerializeToString(deterministic=True) != capa.render.proto.doc_to_pb2( + three + ).SerializeToString(deterministic=True) @pytest.mark.parametrize(