U
    ôbÛV‘  ã                   @   s4   d dl mZ dZdZdZG dd„ deƒZdd„ Zd	S )
é    )ÚBaseMatcherz
Chris RosezCopyright 2012 hamcrest.orgzBSD, see License.txtc                   @   s   e Zd Zddd„Zdd„ ZdS )ÚIsEmptyNc                 C   sV   z,t |ƒdkrW dS |r*| dt |ƒ ¡ W n$ tk
rP   |rJ| d¡ Y dS X d S )Nr   Tzhas %d item(s)zdoes not support lengthF)ÚlenÚappend_textÚ	TypeError)ÚselfÚitemZmismatch_description© r	   úF/usr/lib/python3/dist-packages/hamcrest/library/collection/is_empty.pyÚmatches
   s    
ÿÿzIsEmpty.matchesc                 C   s   |  d¡ d S )Nzan empty collection)r   )r   Zdescriptionr	   r	   r
   Údescribe_to   s    zIsEmpty.describe_to)N)Ú__name__Ú
__module__Ú__qualname__r   r   r	   r	   r	   r
   r      s   
r   c                   C   s   t ƒ S )zy
    This matcher matches any collection-like object that responds to the
    __len__ method, and has a length of 0.
    )r   r	   r	   r	   r
   Úempty   s    r   N)Zhamcrest.core.base_matcherr   Ú
__author__Z__copyright__Z__license__r   r   r	   r	   r	   r
   Ú<module>   s
   