File: //lib/python3/dist-packages/hamcrest/core/core/__pycache__/allof.cpython-38.pyc
U
�b�V� � @ s@ d dl mZ d dlmZ dZdZdZG dd� de�Zdd � Zd
S )� )�BaseMatcher��wrap_matcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtc @ s. e Zd Zdd� Zd
dd�Zdd� Zdd � ZdS )�AllOfc G s
|| _ d S �N)�matchers)�selfr � r �:/usr/lib/python3/dist-packages/hamcrest/core/core/allof.py�__init__ s zAllOf.__init__Nc C s@ | j D ]4}|�|�s|r4|�|��d� |�||� dS qdS )N� FT)r �matchesZappend_description_ofZappend_text�describe_mismatch)r �item�mismatch_descriptionZmatcherr r r
r
s
�z
AllOf.matchesc C s | � ||� d S r )r
)r r r r r r
r s zAllOf.describe_mismatchc C s |� ddd| j� d S )N�(z and �))Zappend_listr )r Zdescriptionr r r
�describe_to s zAllOf.describe_to)N)�__name__�
__module__�__qualname__r r
r r r r r r
r s
r c G s t dd� | D �� S )a� Matches if all of the given matchers evaluate to ``True``.
:param matcher1,...: A comma-separated list of matchers.
The matchers are evaluated from left to right using short-circuit
evaluation, so evaluation stops as soon as a matcher returns ``False``.
Any argument that is not a matcher is implicitly wrapped in an
:py:func:`~hamcrest.core.core.isequal.equal_to` matcher to check for
equality.
c S s g | ]}t |��qS r r )�.0r r r r
�
<listcomp>, s zall_of.<locals>.<listcomp>)r )�itemsr r r
�all_of s
r N) Zhamcrest.core.base_matcherr Z"hamcrest.core.helpers.wrap_matcherr �
__author__Z
__copyright__Z__license__r r r r r r
�<module> s