File: //lib/python3/dist-packages/hamcrest/library/integration/__pycache__/match_equality.cpython-38.pyc
U
�b�V� � @ sD d dl mZ d dlmZ dZdZdZdZG dd� de�Z d d
� Z
dS )� )�tostring)�wrap_matcherz
Chris RosezCopyright 2011 hamcrest.orgzBSD, see License.txtTc @ s, e Zd Zdd� Zdd� Zdd� Zdd� Zd S )
�EqualityWrapperc C s
|| _ d S �N��matcher)�selfr � r �M/usr/lib/python3/dist-packages/hamcrest/library/integration/match_equality.py�__init__ s zEqualityWrapper.__init__c C s | j �|�S r )r Zmatches)r �objectr r r
�__eq__ s zEqualityWrapper.__eq__c C s t | �S r )�repr�r r r r
�__str__ s zEqualityWrapper.__str__c C s
t | j�S r )r r r r r r
�__repr__ s zEqualityWrapper.__repr__N)�__name__�
__module__�__qualname__r r
r r r r r r
r
s r c C s t t| ��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 <http://www.voidspace.org.uk/python/mock/>`_
library.
)r r r r r r
�match_equality s r N)Z hamcrest.core.string_descriptionr Z"hamcrest.core.helpers.wrap_matcherr �
__author__Z
__copyright__Z__license__Z
__unittestr r r r r r r
�<module> s