HOME


Mini Shell 1.0
DIR: /lib/python3/dist-packages/hamcrest/library/object/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/hamcrest/library/object/__pycache__/hasstring.cpython-312.pyc
�

���es��n�ddlmZddlmZddlmZddlmZdZdZ	dZ
Gd�d	ee�Zd
eefd�Z
y)
�)�BaseMatcher)�Description)�wrap_matcher)�MatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtc�B�eZdZdeeddfd�Zdedefd�Zde	ddfd�Z
y)	�	HasString�str_matcher�returnNc��||_y�N)r	)�selfr	s  �C/usr/lib/python3/dist-packages/hamcrest/library/object/hasstring.py�__init__zHasString.__init__s
��&����itemc�J�|jjt|��Sr)r	�matches�str)r
rs  r�_matcheszHasString._matchess�����'�'��D�	�2�2r�descriptionc�X�|jd�j|j�y)Nzan object with str )�append_text�append_description_ofr	)r
rs  r�describe_tozHasString.describe_tos"����� 5�6�L�L�T�M]�M]�^r)�__name__�
__module__�__qualname__rrr�object�boolrrr�rrrrsB��'�G�C�L�'�T�'�3�V�3��3�_�{�_�t�_rrr
c�*�tt|��S)aRMatches 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')

    )rr)�matchs r�
has_stringr#s��$�\�%�(�)�)rN)�hamcrest.core.base_matcherr�hamcrest.core.descriptionr�"hamcrest.core.helpers.wrap_matcherr�hamcrest.core.matcherr�
__author__�
__copyright__�__license__rrr#r rr�<module>r+sC��2�1�;�)�
�
�-�
�$��_��F�#�_�*����*r