
    e+                         d dl mZmZmZmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZ dZdZd	Z ed
      Z G d deeeef            Zdeeee   f   deeeef      fdZy)    )AnyMappingTypeVarUnion)BaseMatcher)Description)	hasmethod)wrap_matcher)MatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtVc                   L    e Zd Zdee   ddfdZdeeef   defdZ	de
ddfdZy)	IsDictContainingValuevalue_matcherreturnNc                     || _         y )N)r   )selfr   s     T/usr/lib/python3/dist-packages/hamcrest/library/collection/isdict_containingvalue.py__init__zIsDictContainingValue.__init__   s
    *    itemc                     t        |d      r2|j                         D ]  }| j                  j                  |      s y y)NvaluesTF)r	   r   r   matches)r   r   values      r   _matcheszIsDictContainingValue._matches   s=    T8$  %%--e4  r   descriptionc                 X    |j                  d      j                  | j                         y )Nza dictionary containing value )append_textappend_description_ofr   )r   r   s     r   describe_toz!IsDictContainingValue.describe_to   s%     @AWW	
r   )__name__
__module____qualname__r   r   r   r   r   boolr   r   r     r   r   r   r      sG    +gaj +T +WS!V_  
{ 
t 
r   r   r   r   c                 *    t        t        |             S )a  Matches if dictionary contains an entry whose value satisfies a given
    matcher.

    :param value_match: The matcher to satisfy for the value, or an expected
        value for :py:func:`~hamcrest.core.core.isequal.equal_to` matching.

    This matcher iterates the evaluated dictionary, searching for any key-value
    entry whose value satisfies the given matcher. If a matching entry is
    found, ``has_value`` is satisfied.

    Any argument that is not a matcher is implicitly wrapped in an
    :py:func:`~hamcrest.core.core.isequal.equal_to` matcher to check for
    equality.

    Examples::

        has_value(equal_to('bar'))
        has_value('bar')

    )r   r
   )r   s    r   	has_valuer'   !   s    * !e!455r   N)typingr   r   r   r   hamcrest.core.base_matcherr   hamcrest.core.descriptionr   hamcrest.core.helpers.hasmethodr	   "hamcrest.core.helpers.wrap_matcherr
   hamcrest.core.matcherr   
__author____copyright____license__r   r   r'   r%   r   r   <module>r1      sx    / / 2 1 5 ; )
-$CL
KQ8 
"6U1gaj=) 6ggc1fo.F 6r   