PHP WebShell

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

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

o

(]^��@s�ddlZddlmZmZmZmZddlmZddlm	Z	ddl
mZddlm
Z
dZdZd	Zed
�ZGdd�de�ZGd
d�deee�Zdee
eefde
eefdd�Zdee
eefde
eefdd�ZdS)�N)�Optional�Sequence�TypeVar�Union)�BaseMatcher)�Description)�wrap_matcher)�MatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txt�Tc@sreZdZdeeedeeddfdd�Zdede	fdd	�Z
de	fd
d�Zdede	fdd
�Zdede	fdd�Z
dS)�MatchingInOrder�matchers�mismatch_description�returnNcCs||_||_d|_dS)Nr)rr
�next_match_index)�selfrr
�r�Z/usr/lib/python3/dist-packages/hamcrest/library/collection/issequence_containinginorder.py�__init__s
zMatchingInOrder.__init__�itemcCs|�|�o	|�|�S�N)�isnotsurplus�	ismatched�rrrrr�matchesszMatchingInOrder.matchescCs8|jt|j�kr|jr|j�d��|j|j�dSdS)NzNo item matched: FT)r�lenrr
�append_text�append_description_of)rrrr�
isfinisheds
�zMatchingInOrder.isfinishedcCsZ|j|j}|�|�s$|jr"|j�dt|j�d�|�||j�dS|jd7_dS)Nzitem z: F�T)rrrr
r�str�describe_mismatch)rr�matcherrrrr$s
zMatchingInOrder.ismatchedcCs0t|j�|jkr|jr|j�d��|�dSdS)Nz
Not matched: FT)rrrr
rrrrrrr.s
zMatchingInOrder.isnotsurplus)�__name__�
__module__�__qualname__rr	r
rrr�boolrrrrrrrrrs
��
�	
rcs|eZdZdeeeddfdd�Z	ddeedeede	f�fdd	�
Z
deededdfd
d�Zdeddfd
d�Z�Z
S)�IsSequenceContainingInOrderrrNcCs
||_dSr)r)rrrrrr7s
z$IsSequenceContainingInOrder.__init__rr
cs^zt|j|�}|D]}|�|�sWdSq	|��WSty.|r+tt|��||�YdSw)NF)rrrr�	TypeError�superr&r )rrr
�
matchsequence�element��	__class__rrr:s
�

��z#IsSequenceContainingInOrder.matchescCs|�||�dSr)r)rrr
rrrr Jsz-IsSequenceContainingInOrder.describe_mismatch�descriptioncCs|�d��ddd|j�dS)Nza sequence containing �[z, �])r�append_listr)rr-rrr�describe_toMsz'IsSequenceContainingInOrder.describe_tor)r"r#r$rr	r
rrrr%rr r1�
__classcell__rrr+rr&6s����r&�itemsrcGs$g}|D]	}|�t|��qt|�S)a�Matches if sequence's elements satisfy a given list of matchers, in order.

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

    This matcher iterates the evaluated sequence and a given list of matchers,
    seeing if each element satisfies its corresponding matcher.

    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.

    )�appendrr&)r3rrrrr�contains_exactlyQs
r5cGst�dt�t|�S)z)Deprecated - use contains_exactly(*items)z)deprecated - use contains_exactly(*items))�warnings�warn�DeprecationWarningr5)r3rrr�containsdsr9)r6�typingrrrr�hamcrest.core.base_matcherr�hamcrest.core.descriptionr�"hamcrest.core.helpers.wrap_matcherr�hamcrest.core.matcherr	�
__author__�
__copyright__�__license__r
�objectrr&r5r9rrrr�<module>s&&*

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


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