File: //lib/python3/dist-packages/hamcrest/library/object/__pycache__/hasstring.cpython-38.pyc
U
�b�V� � @ s@ d dl mZ d dlmZ dZdZdZG dd� de�Zdd � Zd
S )� )�BaseMatcher)�wrap_matcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtc @ s$ e Zd Zdd� Zdd� Zdd� ZdS )� HasStringc C s
|| _ d S �N)�str_matcher)�selfr � r �C/usr/lib/python3/dist-packages/hamcrest/library/object/hasstring.py�__init__ s zHasString.__init__c C s | j �t|��S r )r Zmatches�str)r �itemr r r �_matches s zHasString._matchesc C s |� d��| j� d S )Nzan object with str )Zappend_textZappend_description_ofr )r Zdescriptionr r r �describe_to s
�zHasString.describe_toN)�__name__�
__module__�__qualname__r
r
r r r r r r s r c C s 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 )�matchr r r �
has_string s r N) Zhamcrest.core.base_matcherr Z"hamcrest.core.helpers.wrap_matcherr �
__author__Z
__copyright__Z__license__r r r r r r �<module> s