e%ddlmZmZmZmZmZddlmZddlm Z ddl m Z ddl m Z ddlmZdZdZd Zed e ZGd d eeeefZdeeeefdeeeeffdZy))AnyHashableMappingTypeVarUnion) BaseMatcher) Description) hasmethod) wrap_matcher)MatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtK)boundcLeZdZdeeddfdZdeeefdefdZ de ddfdZ y) IsDictContainingKey key_matcherreturnNc||_y)N)r)selfrs R/usr/lib/python3/dist-packages/hamcrest/library/collection/isdict_containingkey.py__init__zIsDictContainingKey.__init__s &itemct|dr2|jD]}|jj|syy)NkeysTF)r rrmatches)rrkeys r_matcheszIsDictContainingKey._matchess= T6 "yy{ ##++C0 r descriptioncX|jdj|jy)Nza dictionary containing key ) append_textappend_description_ofr)rrs r describe_tozIsDictContainingKey.describe_tos% >?UU    r) __name__ __module__ __qualname__r r rrrboolrr r"rrrrsG'GAJ'4'WQV_ { t rr key_matchrc*tt|S)aMatches if dictionary contains an entry whose key satisfies a given matcher. :param key_match: The matcher to satisfy for the key, 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 key satisfies the given matcher. If a matching entry is found, ``has_key`` 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_key(equal_to('foo')) has_key('foo') )rr )r(s rhas_keyr*!s* |I6 77rN)typingrrrrrhamcrest.core.base_matcherrhamcrest.core.descriptionr hamcrest.core.helpers.hasmethodr "hamcrest.core.helpers.wrap_matcherr hamcrest.core.matcherr __author__ __copyright__ __license__r rr*r'rrr4s{99215;)  - $  Cx  +gafo6 "8uQ ]+830H8r