esnddlmZddlmZddlmZddlmZdZdZ dZ Gdd ee Z d ee fd Z y ) ) BaseMatcher) Description) wrap_matcher)MatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtcBeZdZdeeddfdZdedefdZde ddfdZ y) HasString str_matcherreturnNc||_yN)r )selfr s C/usr/lib/python3/dist-packages/hamcrest/library/object/hasstring.py__init__zHasString.__init__ s &itemcJ|jjt|Sr )r matchesstr)r rs r_matcheszHasString._matchess''D 22r descriptioncX|jdj|jy)Nzan object with str ) append_textappend_description_ofr )r rs r describe_tozHasString.describe_tos" 56LLTM]M]^r) __name__ __module__ __qualname__rrrobjectboolrrrrrrr sB'GCL'T'3V33_{_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_matcherrhamcrest.core.descriptionr"hamcrest.core.helpers.wrap_matcherrhamcrest.core.matcherr __author__ __copyright__ __license__rrr#r rrr+sC21;)  - $ _ F#_**r