e+jddlmZddlmZddlmZddlmZdZdZ dZ dZ Gd d e Z d ed e fd Zy))Any) wrap_matcher)Matcher)tostringz Chris RosezCopyright 2011 hamcrest.orgzBSD, see License.txtTcDeZdZdeddfdZdedefdZdefdZ defdZ y) EqualityWrappermatcherreturnNc||_yNr )selfr s M/usr/lib/python3/dist-packages/hamcrest/library/integration/match_equality.py__init__zEqualityWrapper.__init__s  objc8|jj|Sr )r matches)rrs r__eq__zEqualityWrapper.__eq__s||##C((rct|Sr )reprrs r__str__zEqualityWrapper.__str__s Dzrc,t|jSr )rr rs r__repr__zEqualityWrapper.__repr__s %%r) __name__ __module__ __qualname__rrrboolrstrrrrrrr s@D)#)$)&#&rrr r c*tt|S)a<Wraps a matcher to define equality in terms of satisfying the matcher. ``match_equality`` allows Hamcrest matchers to be used in libraries that are not Hamcrest-aware. They might use the equality operator:: assert match_equality(matcher) == object Or they might provide a method that uses equality for its test:: library.method_that_tests_eq(match_equality(matcher)) One concrete example is integrating with the ``assert_called_with`` methods in Michael Foord's `mock `_ library. )rrr s rmatch_equalityr#s" <0 11rN)typingr"hamcrest.core.helpers.wrap_matcherrhamcrest.core.matcherr hamcrest.core.string_descriptionr __author__ __copyright__ __license__ __unittestobjectrr#r!rrr-sD;)5  - $   &f &2G22r