U
    òÀMfO  ã                   @   s\   d dl mZ d dlmZ d dlmZ dZdZdZG dd„ dee	 ƒZ
e	ee	 d	œd
d„ZdS )é    )ÚBaseMatcher)ÚDescription)ÚMatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtc                   @   s<   e Zd Zeddœdd„Zeedœdd„Zeddœd	d
„ZdS )ÚIsEqualIgnoringCaseN©ÚstringÚreturnc                 C   s&   t |tƒstdƒ‚|| _| ¡ | _d S )Nz#IsEqualIgnoringCase requires string)Ú
isinstanceÚstrÚ	TypeErrorÚoriginal_stringÚlowerÚlowered_string)Úselfr   © r   úO/tmp/pip-unpacked-wheel-97nlcpo6/hamcrest/library/text/isequal_ignoring_case.pyÚ__init__   s    
zIsEqualIgnoringCase.__init__)Úitemr   c                 C   s   t |tƒsdS | j| ¡ kS )NF)r	   r
   r   r   )r   r   r   r   r   Ú_matches   s    
zIsEqualIgnoringCase._matches)Údescriptionr   c                 C   s   |  | j¡ d¡ d S )Nz ignoring case)Zappend_description_ofr   Zappend_text)r   r   r   r   r   Údescribe_to   s    zIsEqualIgnoringCase.describe_to)	Ú__name__Ú
__module__Ú__qualname__r
   r   Úboolr   r   r   r   r   r   r   r   
   s   r   r   c                 C   s   t | ƒS )a“  Matches if object is a string equal to a given string, ignoring case
    differences.

    :param string: The string to compare against as the expected value.

    This matcher first checks whether the evaluated object is a string. If so,
    it compares it with ``string``, ignoring differences of case.

    Example::

        equal_to_ignoring_case("hello world")

    will match "heLLo WorlD".

    )r   )r   r   r   r   Úequal_to_ignoring_case   s    r   N)Zhamcrest.core.base_matcherr   Zhamcrest.core.descriptionr   Zhamcrest.core.matcherr   Ú
__author__Ú__copyright__Ú__license__r
   r   r   r   r   r   r   Ú<module>   s   