HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/hamcrest/library/text/__pycache__/stringcontainsinorder.cpython-310.pyc
o

(]^��@sjddlmZddlmZddlmZddlmZdZdZ	dZ
Gdd	�d	ee�Zd
edeefdd
�Z
dS)�)�BaseMatcher)�Description)�	hasmethod)�MatcherzRomilly CockingzCopyright 2011 hamcrest.orgzBSD, see License.txtc@s:eZdZddd�Zdedefdd�Zdeddfd	d
�ZdS)�StringContainsInOrder�returnNcGs.|D]}t|t�st|jjd��q||_dS)Nz requires string arguments)�
isinstance�str�	TypeError�	__class__�__name__�
substrings)�selfr
�	substring�r�M/usr/lib/python3/dist-packages/hamcrest/library/text/stringcontainsinorder.py�__init__s

�
zStringContainsInOrder.__init__�itemcCs<t|d�sdSd}|jD]}|�||�}|dkrdSqdS)N�findFr���T)rr
r)rr�
from_indexrrrr�_matchess

�zStringContainsInOrder._matches�descriptioncCs|�ddd|j�dS)Nza string containing z, z	 in order)�append_listr
)rrrrr�describe_tosz!StringContainsInOrder.describe_to)rN)	r�
__module__�__qualname__rr	�boolrrrrrrrrs

rr
rcGst|�S)aMatches if object is a string containing a given list of substrings in
    relative order.

    :param string1,...:  A comma-separated list of strings.

    This matcher first checks whether the evaluated object is a string. If so,
    it checks whether it contains a given list of strings, in relative order to
    each other. The searches are performed starting from the beginning of the
    evaluated string.

    Example::

        string_contains_in_order("bc", "fg", "jkl")

    will match "abcdefghijklm".

    )r)r
rrr�string_contains_in_order srN)�hamcrest.core.base_matcherr�hamcrest.core.descriptionr�hamcrest.core.helpers.hasmethodr�hamcrest.core.matcherr�
__author__�
__copyright__�__license__r	rrrrrr�<module>s