PHP WebShell

Текущая директория: /usr/lib/python3/dist-packages/hamcrest/library/collection/__pycache__

Просмотр файла: issequence_containing.cpython-310.pyc

o

(]^h
�@s�ddlmZmZmZmZddlmZddlmZddl	m
Z
ddlmZddl
mZdZdZd	Zed
�ZGdd�deee�ZGd
d�deee�Zdeeeefdeeefdd�Zdeeeefdeeefdd�ZdS)�)�Sequence�TypeVar�Union�cast)�BaseMatcher)�all_of)�Description)�wrap_matcher)�MatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txt�Tc@sJeZdZdeeddfdd�Zdeedefdd�Zd	e	ddfd
d�Z
dS)�IsSequenceContaining�element_matcher�returnNcCs
||_dS�N)r
)�selfr
�r�S/usr/lib/python3/dist-packages/hamcrest/library/collection/issequence_containing.py�__init__s
zIsSequenceContaining.__init__�itemcCs:z|D]}|j�|�rWdSqWdStyYdSw)NTF)r
�matches�	TypeError)rr�elementrrr�_matchess����zIsSequenceContaining._matches�descriptioncCs|�d��|j�dS)Nza sequence containing )�append_text�append_description_ofr
�rrrrr�describe_tos
�z IsSequenceContaining.describe_to)�__name__�
__module__�__qualname__r
rrr�boolrrrrrrrrs	rc@sdeZdZdeeddfdd�Zdeedefdd�Zdeed	e	ddfd
d�Z
de	ddfd
d�ZdS)�IsSequenceContainingEvery�element_matchersrNcGsdd�|D�}t|�|_dS)NcSs"g|]
}ttttt|���qSr)rr
rr�has_item)�.0�errr�
<listcomp>)s"z6IsSequenceContainingEvery.__init__.<locals>.<listcomp>)r�matcher)rr#�	delegatesrrrr(sz"IsSequenceContainingEvery.__init__rcCs(z	|j�t|��WStyYdSw)NF)r(r�listr)rrrrrr,s
�z"IsSequenceContainingEvery._matches�mismatch_descriptioncCs|j�||�dSr)r(�describe_mismatch)rrr+rrrr,2sz+IsSequenceContainingEvery.describe_mismatchrcCs|j�|�dSr)r(rrrrrr5sz%IsSequenceContainingEvery.describe_to)rrr r
rrrr!rrr,rrrrrr"'s
r"�matchrcCstt|��S)a Matches if any element of sequence satisfies a given matcher.

    :param match: The matcher to satisfy, or an expected value for
        :py:func:`~hamcrest.core.core.isequal.equal_to` matching.

    This matcher iterates the evaluated sequence, searching for any element
    that satisfies a given matcher. If a matching element is found,
    ``has_item`` is satisfied.

    If the ``match`` argument is not a matcher, it is implicitly wrapped in an
    :py:func:`~hamcrest.core.core.isequal.equal_to` matcher to check for
    equality.

    )rr	)r-rrrr$9sr$�itemscGs$g}|D]	}|�t|��qt|�S)a�Matches if all of the given matchers are satisfied by any elements of
    the sequence.

    :param match1,...: A comma-separated list of matchers.

    This matcher iterates the given matchers, searching for any elements in the
    evaluated sequence that satisfy them. If each matcher is satisfied, then
    ``has_items`` is satisfied.

    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.

    )�appendr	r")r.�matchersrrrr�	has_itemsKsr1N)�typingrrrr�hamcrest.core.base_matcherr�hamcrest.core.core.allofr�hamcrest.core.descriptionr�"hamcrest.core.helpers.wrap_matcherr	�hamcrest.core.matcherr
�
__author__�
__copyright__�__license__rrr"r$r1rrrr�<module>s&*

Выполнить команду


Для локальной разработки. Не используйте в интернете!