File manager - Edit - /usr/lib/python3/dist-packages/hamcrest/library/object/__pycache__/hasstring.cpython-310.pyc
Back
o (]^s � @ sf d dl mZ d dlmZ d dlmZ d dlmZ dZdZ dZ G dd � d ee �Zd ee fdd�Z d S )� )�BaseMatcher)�Description)�wrap_matcher)�MatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtc @ sF e Zd Zdee ddfdd�Zdedefdd�Zd e ddfd d�Z dS )� HasString�str_matcher�returnNc C s || _ d S �N)r )�selfr � r �C/usr/lib/python3/dist-packages/hamcrest/library/object/hasstring.py�__init__ s zHasString.__init__�itemc C s | j �t|��S r )r �matches�str)r r r r r �_matches s zHasString._matches�descriptionc C s |� d��| j� d S )Nzan object with str )�append_text�append_description_ofr )r r r r r �describe_to s zHasString.describe_to)�__name__� __module__�__qualname__r r r �object�boolr r r r r r r r s r 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)�hamcrest.core.base_matcherr �hamcrest.core.descriptionr �"hamcrest.core.helpers.wrap_matcherr �hamcrest.core.matcherr � __author__� __copyright__�__license__r r r r r r r �<module> s
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings