�
���eq � � � d dl mZ d dlmZ d dlmZ d dlmZ d dlm Z d dl
mZ d dlm
Z
dZd Zd
Z G d� dee � Zd
eee
e f de
e fd�Zy)� )�Sized)�Union)�BaseMatcher)�Description)� hasmethod)�wrap_matcher)�MatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtc �b � � e Zd Zdee ddfd�Zdedefd�Zdede ddf� fd�Z
d e ddfd
�Z� xZS )� HasLength�len_matcher�returnNc � � || _ y )N)r )�selfr s �C/usr/lib/python3/dist-packages/hamcrest/library/object/haslength.py�__init__zHasLength.__init__ s
� �&��� �itemc �d � t |d� sy| j j t |� � S )N�__len__F)r r �matches�len)r r s r �_matcheszHasLength._matches s* � ���y�)�����'�'��D� �2�2r �mismatch_descriptionc � �� t t | � ||� t |d� r*|j d� j t
|� � y y )Nr z with length of )�superr �describe_mismatchr �append_text�append_description_ofr )r r r � __class__s �r r zHasLength.describe_mismatch sE �� �
�i��0��7K�L��T�9�%� �,�,�-?�@�V�V�WZ�[_�W`�a� &r �descriptionc �X � |j d� j | j � y )Nzan object with length of )r r r )r r s r �describe_tozHasLength.describe_to s# � ���� ;�<�R�R�SW�Sc�Sc�dr )
�__name__�
__module__�__qualname__r �intr r �boolr r r r" |