Your IP : 216.73.217.13


Current Path : /lib/python3/dist-packages/hamcrest/library/text/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/hamcrest/library/text/__pycache__/stringmatches.cpython-38.pyc

U

�b�V�@sPdZdZdZddlZddlZddlmZddlmZGdd�de�Z	d	d
�Z
dS)z
Chris RosezCopyright 2011 hamcrest.orgzBSD, see License.txt�N)�BaseMatcher)�	hasmethodc@s$eZdZdd�Zdd�Zdd�ZdS)�StringMatchesPatterncCs
||_dS�N��pattern)�selfr�r	�E/usr/lib/python3/dist-packages/hamcrest/library/text/stringmatches.py�__init__szStringMatchesPattern.__init__cCs|�d��|jj��d�dS)Nza string matching '�')Zappend_textr)rZdescriptionr	r	r
�describe_tos

��z StringMatchesPattern.describe_tocCs|j�|�dk	Sr)r�search)r�itemr	r	r
�_matchesszStringMatchesPattern._matchesN)�__name__�
__module__�__qualname__rr
rr	r	r	r
rsrcCst|tj�rt�|�}t|�S)aKMatches if object is a string containing a match for a given regular
    expression.

    :param pattern: The regular expression to search for.

    This matcher first checks whether the evaluated object is a string. If so,
    it checks if the regular expression ``pattern`` matches anywhere within the
    evaluated object.

    )�
isinstance�sixZstring_types�re�compilerrr	r	r
�matches_regexps
r)�
__author__Z
__copyright__Z__license__rrZhamcrest.core.base_matcherrZhamcrest.core.helpers.hasmethodrrrr	r	r	r
�<module>s