
    e'                     `    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      Z	d	e
d
ee
   fdZy)    )	hasmethod)Matcher)SubstringMatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtc                   6     e Zd Zd fdZdedefdZd Z xZS )StringEndsWithreturnc                 ,    t         t        |   |       y )N)superr   __init__)self	substring	__class__s     F/usr/lib/python3/dist-packages/hamcrest/library/text/stringendswith.pyr   zStringEndsWith.__init__   s    nd,Y7    itemc                 R    t        |d      sy|j                  | j                        S )NendswithF)r   r   r   )r   r   s     r   _matcheszStringEndsWith._matches   s"    z*}}T^^,,r   c                      y)Nzending with )r   s    r   relationshipzStringEndsWith.relationship   s    r   )r   N)	__name__
__module____qualname__r   strboolr   r   __classcell__)r   s   @r   r   r   
   s     8-S -T -
r   r   stringr   c                     t        |       S )aW  Matches if object is a string ending with a given string.

    :param string: The string to search for.

    This matcher first checks whether the evaluated object is a string. If so,
    it checks if ``string`` matches the ending characters of the evaluated
    object.

    Example::

        ends_with("bar")

    will match "foobar".

    )r   )r   s    r   	ends_withr       s      &!!r   N)hamcrest.core.helpers.hasmethodr   hamcrest.core.matcherr   &hamcrest.library.text.substringmatcherr   
__author____copyright____license__r   r   r    r   r   r   <module>r'      sA    5 ) C
-$
% 
"c "gcl "r   