Skip to main content

hamcrest-proto

Hamcrest matchers for Protocol Buffers in Python.

This is forked from proto-matcher which was no longer receiving updates and which was itself based on MessageDifferencer and EqualsProto googletest matcher.

API

This packages provides the following proto-related matchers:

equals_proto

equals_proto(message: Union[Message, str])

Test the argument equals the given protobuf message.

approximately

approximately(proto_matcher: Matcher[Message],
              float_margin: Optional[float] = None,
              float_fraction: Optional[float] = None)

Test the argument equals the given protobuf message, while comparing any float field using approximation.

ignoring_field_paths

ignoring_field_paths(field_paths: Set[Tuple[str, ...]],
                     matcher: _ProtoMatcher)

Test the argument equals the given protobuf message, while ignoring those fields specified in the field paths.

ignoring_repeated_field_ordering

ignoring_repeated_field_ordering(proto_matcher: Matcher[Message])

Test the argument equals the given protobuf message, ignoring the ordering of any repeated field.

partially

partially(proto_matcher: Matcher[Message])

Test 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hamcrest_proto-0.0.7.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hamcrest_proto-0.0.7-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file hamcrest_proto-0.0.7.tar.gz.

File metadata

  • Download URL: hamcrest_proto-0.0.7.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for hamcrest_proto-0.0.7.tar.gz
Algorithm Hash digest
SHA256 2420fac3d3c9a13f2568fcf7fd5f870c251d0c08ff022c4c0778dce82791106e
MD5 a5d2571658ed5a099cbfb9b81273aec6
BLAKE2b-256 365709be417a3912741bb198154ae2b9349ffb81911b9d14f99cc26538cfdc88

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamcrest_proto-0.0.7.tar.gz:

Publisher: publish.yml on mdepinet/hamcrest-proto

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hamcrest_proto-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: hamcrest_proto-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for hamcrest_proto-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e3570d4d3dbc507dbd4791aeb1d5e4cff9f258e885d64a31043afc068bb22ad8
MD5 94a8e7554e34d609d6ddf4c36c50dbe4
BLAKE2b-256 72a919609bc8d3830e24b05833f444e06655e885a14b64090068bded13ee7b05

See more details on using hashes here.

Provenance

The following attestation bundles were made for hamcrest_proto-0.0.7-py3-none-any.whl:

Publisher: publish.yml on mdepinet/hamcrest-proto

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page