
    es                     n    d dl mZ d dlmZ d dlmZ d dlmZ dZdZ	dZ
 G d d	ee         Zd
ee   fdZy)    )BaseMatcher)Description)wrap_matcher)MatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtc                   B    e Zd Zdee   ddfdZdedefdZde	ddfdZ
y)		HasStringstr_matcherreturnNc                     || _         y N)r	   )selfr	   s     C/usr/lib/python3/dist-packages/hamcrest/library/object/hasstring.py__init__zHasString.__init__   s
    &    itemc                 J    | j                   j                  t        |            S r   )r	   matchesstr)r   r   s     r   _matcheszHasString._matches   s    ''D	22r   descriptionc                 X    |j                  d      j                  | j                         y )Nzan object with str )append_textappend_description_ofr	   )r   r   s     r   describe_tozHasString.describe_to   s"     56LLTM]M]^r   )__name__
__module____qualname__r   r   r   objectboolr   r   r    r   r   r   r      sB    'GCL 'T '3V 3 3_{ _t _r   r   r
   c                 *    t        t        |             S )aR  Matches if ``str(item)`` satisfies a given matcher.

    :param match: The matcher to satisfy, or an expected value for
        :py:func:`~hamcrest.core.core.isequal.equal_to` matching.

    This matcher invokes the :py:func:`str` function on the evaluated object to
    get its length, passing the result to a given matcher for evaluation. If
    the ``match`` argument is not a matcher, it is implicitly wrapped in an
    :py:func:`~hamcrest.core.core.isequal.equal_to` matcher to check for
    equality.

    Examples::

        has_string(starts_with('foo'))
        has_string('bar')

    )r   r   )matchs    r   
has_stringr#      s    $ \%())r   N)hamcrest.core.base_matcherr   hamcrest.core.descriptionr   "hamcrest.core.helpers.wrap_matcherr   hamcrest.core.matcherr   
__author____copyright____license__r   r   r#   r    r   r   <module>r+      sC    2 1 ; )
-$_F# _* *r   