| Server IP : 65.1.209.187 / Your IP : 216.73.216.144 Web Server : nginx/1.24.0 System : Linux ip-172-31-5-206 6.14.0-1015-aws #15~24.04.1-Ubuntu SMP Tue Sep 23 22:44:48 UTC 2025 x86_64 User : ( 1001) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/hamcrest/library/text/__pycache__/ |
Upload File : |
�
���e� � �r � d dl mZ d dlmZ d dlmZ d dlmZ dZdZ dZ
G d� d ee � Zd
edee fd�Z
y
)� )�BaseMatcher)�Description)� hasmethod)�MatcherzRomilly CockingzCopyright 2011 hamcrest.orgzBSD, see License.txtc �4 � e Zd Zdd�Zdedefd�Zdeddfd�Zy) �StringContainsInOrder�returnNc � � |D ]4 }t |t � r�t | j j dz � � || _ y )Nz requires string arguments)�
isinstance�str� TypeError� __class__�__name__�
substrings)�selfr � substrings �M/usr/lib/python3/dist-packages/hamcrest/library/text/stringcontainsinorder.py�__init__zStringContainsInOrder.__init__ sA � �#� X�I��i��-����� 7� 7�:V� V�W�W� X� %��� �itemc �v � t |d� syd}| j D ] }|j ||� }|dk( s� y y)N�findFr ���T)r r r )r r �
from_indexr s r �_matcheszStringContainsInOrder._matches sG � ���v�&���
���� �I����9�j�9�J��R��� � r �descriptionc �@ � |j ddd| j � y )Nza string containing z, z in order)�append_listr )r r s r �describe_toz!StringContainsInOrder.describe_to s � ���� 6��k�4�?�?�[r )r N) r �
__module__�__qualname__r r �boolr r r � r r r r s0 � �%��S� �T� �\�{� \�t� \r r r r c � � t | � S )a Matches 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 s r �string_contains_in_orderr% s � �$ !�*�-�-r N)�hamcrest.core.base_matcherr �hamcrest.core.descriptionr �hamcrest.core.helpers.hasmethodr �hamcrest.core.matcherr �
__author__�
__copyright__�__license__r r r% r# r r �<module>r- sJ �� 2� 1� 5� )�
�
�-�
�$��\�K��,� \�*.�#� .�'�#�,� .r