PHP WebShell

Текущая директория: /usr/lib/python3/dist-packages/hamcrest/library/collection/__pycache__

Просмотр файла: isdict_containing.cpython-310.pyc

o

(]^	�	@s�ddlmZmZmZmZddlmZddlmZddl	m
Z
ddlmZddl
mZdZdZd	Zed
ed�Zed�ZGd
d�deeeef�Zdeeeefdeeeefdeeeeffdd�ZdS)�)�Hashable�Mapping�TypeVar�Union)�BaseMatcher)�Description)�	hasmethod)�wrap_matcher)�MatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txt�K)�bound�Vc@sVeZdZdeedeeddfdd�Zdeeefdefdd	�Z	d
e
ddfdd�ZdS)
�IsDictContaining�key_matcher�
value_matcher�returnNcCs||_||_dS)N)rr)�selfrr�r�O/usr/lib/python3/dist-packages/hamcrest/library/collection/isdict_containing.py�__init__s
zIsDictContaining.__init__�itemcCs>t|d�r|��D]\}}|j�|�r|j�|�rdSq	dS)N�itemsTF)rrr�matchesr)rr�key�valuerrr�_matchess
�zIsDictContaining._matches�descriptioncCs*|�d��|j��d��|j��d�dS)Nza dictionary containing [z: �])�append_text�append_description_ofrr)rrrrr�describe_tos
�zIsDictContaining.describe_to)�__name__�
__module__�__qualname__r
rr
rr�boolrrr rrrrrsr�	key_match�value_matchrcCstt|�t|��S)aOMatches if dictionary contains key-value entry satisfying a given pair
    of matchers.

    :param key_match: The matcher to satisfy for the key, or an expected value
        for :py:func:`~hamcrest.core.core.isequal.equal_to` matching.
    :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 that satisfies ``key_match`` and ``value_match``. If a matching entry
    is found, ``has_entry`` 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_entry(equal_to('foo'), equal_to(1))
        has_entry('foo', 1)

    )rr	)r%r&rrr�	has_entry$sr'N)�typingrrrr�hamcrest.core.base_matcherr�hamcrest.core.descriptionr�hamcrest.core.helpers.hasmethodr�"hamcrest.core.helpers.wrap_matcherr	�hamcrest.core.matcherr
�
__author__�
__copyright__�__license__rr
rr'rrrr�<module>s&���

Выполнить команду


Для локальной разработки. Не используйте в интернете!