/usr/lib/python3/dist-packages/hamcrest/library/text/__pycache__
Edit: /usr/lib/python3/dist-packages/hamcrest/library/text/__pycache__/stringmatches.cpython-310.pyc (1841B)
o
(]^Ñ ã @ s‚ d dl Z d dlmZmZ d dlmZ d dlmZ d dlm Z dZ
dZdZG d d
„ d
ee
ƒZdee
ee
f de e
fd
d„ZdS )é N)ÚPatternÚUnion)ÚBaseMatcher)ÚDescription)ÚMatcherz
Chris RosezCopyright 2011 hamcrest.orgzBSD, see License.txtc @ s: e Zd Zddd„Zdeddfdd„Zdedefd d
„ZdS )ÚStringMatchesPatternÚreturnNc C s
|| _ d S ©N©Úpattern)Úselfr © r
úE/usr/lib/python3/dist-packages/hamcrest/library/text/stringmatches.pyÚ__init__ s
zStringMatchesPattern.__init__Údescriptionc C s | d¡ | jj¡ d¡ d S )Nza string matching 'ú')Úappend_textr )r r r
r
r Údescribe_to s
ÿz StringMatchesPattern.describe_toÚitemc C s | j |¡d uS r )r Úsearch)r r r
r
r Ú_matches s zStringMatchesPattern._matches)r N) Ú__name__Ú
__module__Ú__qualname__r r r ÚstrÚboolr r
r
r
r r
s
r r r c C s t | tƒr
t | ¡} t| ƒS )aK Matches 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.
)Ú
isinstancer ÚreÚcompiler r
r
r
r Úmatches_regexp s
r )r Útypingr r Úhamcrest.core.base_matcherr Úhamcrest.core.descriptionr Úhamcrest.core.matcherr Ú
__author__Ú
__copyright__Ú__license__r r r r
r
r
r Ú
s &