{"id":17511711,"url":"https://github.com/dayfine/proto-matcher","last_synced_at":"2025-04-23T12:53:36.529Z","repository":{"id":42934949,"uuid":"276310343","full_name":"dayfine/proto-matcher","owner":"dayfine","description":"Test matchers for https://developers.google.com/protocol-buffers in Python","archived":false,"fork":false,"pushed_at":"2023-09-28T22:46:17.000Z","size":37,"stargazers_count":5,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T08:08:26.674Z","etag":null,"topics":["google","matcher","matchers","protobuf","python","python3","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dayfine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-01T07:39:33.000Z","updated_at":"2024-06-27T07:13:22.000Z","dependencies_parsed_at":"2025-03-05T15:41:44.989Z","dependency_job_id":null,"html_url":"https://github.com/dayfine/proto-matcher","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dayfine%2Fproto-matcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dayfine%2Fproto-matcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dayfine%2Fproto-matcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dayfine%2Fproto-matcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dayfine","download_url":"https://codeload.github.com/dayfine/proto-matcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250438821,"owners_count":21430816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google","matcher","matchers","protobuf","python","python3","testing"],"created_at":"2024-10-20T05:08:55.036Z","updated_at":"2025-04-23T12:53:36.494Z","avatar_url":"https://github.com/dayfine.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# proto-matcher\n\nTest matchers for Protobuffer in Python.\n\nThis is based on [MessageDifferencer](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.util.message_differencer) as well as the [EqualsProto](https://github.com/google/googletest/issues/1761) googletest matcher.\n\n## API\n\nThis packages provides the following [PyHamcrest](https://github.com/hamcrest/PyHamcrest) matchers:\n\n### `equals_proto`\n\n```python\nequals_proto(message: Union[Message, str])\n```\nTest the argument equals the given protobuf message.\n\n### `approximately`\n\n```python\napproximately(proto_matcher: Matcher[Message],\n              float_margin: Optional[float] = None,\n              float_fraction: Optional[float] = None)\n```\nTest the argument equals the given protobuf message, while comparing any float field using approximation.\n\n### `ignoring_field_paths`\n\n```python\nignoring_field_paths(field_paths: Set[Tuple[str]],\n                     matcher: _ProtoMatcher)\n```\nTest the argument equals the given protobuf message, while ignoring those fields specified in the field paths.\n\n\n### `ignoring_repeated_field_ordering`\n\n```python\nignoring_repeated_field_ordering(proto_matcher: Matcher[Message])\n```\nTest the argument equals the given protobuf message, ignoring the ordering of any repeated field.\n\n\n### `partially`\n\n```python\npartially(proto_matcher: Matcher[Message])\n```\nTest the argument partially equals the given protobuf message, i.e. if a field is in the argument but not in the expected message, it's ignored in the comparsion.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdayfine%2Fproto-matcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdayfine%2Fproto-matcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdayfine%2Fproto-matcher/lists"}