Test matcher for protobuffer
Project description
proto-matcher
Test matchers for Protobuffer in Python.
This is based on MessageDifferencer as well as the EqualsProto googletest matcher.
API
This packages provides the following PyHamcrest 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file proto_matcher-0.0.3.tar.gz
.
File metadata
- Download URL: proto_matcher-0.0.3.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afcf486d51d2122b319c4c3ee5fed56cb0e7aa27c406244694280d9a21e88498 |
|
MD5 | 46dfc26fec374860562d6d6319ca0931 |
|
BLAKE2b-256 | aacf13febd4ec52bf3275715f4b83770b889ea489e86593db5e6cbe5f9400d76 |
File details
Details for the file proto_matcher-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: proto_matcher-0.0.3-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5193bbd722d7654a8205121888521d92223055c33704bf0219d8241944f3eb49 |
|
MD5 | 928920ba923beaf83b03a370f93d78d4 |
|
BLAKE2b-256 | c1cacb4f6639cc51efe1b21f74148d84eedf18bf76dee3000f0d83265c8c2134 |