Helpers¶
Utilities for writing Matchers
hasmethod¶
wrap_matcher¶
- hamcrest.core.helpers.wrap_matcher.wrap_matcher(x)¶
Wraps argument in a matcher, if necessary.
- Returns
the argument as-is if it is already a matcher, otherwise wrapped in an
equal_to
matcher.- Parameters
x (Union[hamcrest.core.matcher.Matcher[hamcrest.core.helpers.wrap_matcher.T], hamcrest.core.helpers.wrap_matcher.T]) –
- Return type
hamcrest.core.matcher.Matcher[hamcrest.core.helpers.wrap_matcher.T]