File: //proc/self/root/usr/lib/python3/dist-packages/hamcrest/core/core/__pycache__/isnot.cpython-38.pyc
U
�b�V� � @ s| d dl mZ dZdZdZd dlmZmZ d dlm Z m
Z
ddlmZ dd l
mZ G d
d� de�Zdd
� Zdd� Zdd� ZdS )� )�absolute_importzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txt)�BaseMatcher�Matcher)�wrap_matcher�is_matchable_type� )�equal_to)�instance_ofc @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�IsNotc C s
|| _ d S �N)�matcher)�selfr � r �:/usr/lib/python3/dist-packages/hamcrest/core/core/isnot.py�__init__ s zIsNot.__init__c C s | j �|� S r )r Zmatches)r
�itemr r r �_matches s zIsNot._matchesc C s |� d��| j� d S )Nznot )Zappend_textZappend_description_ofr )r
Zdescriptionr r r �describe_to s zIsNot.describe_toN)�__name__�
__module__�__qualname__r r r r r r r r
s r
c C s t | �rt| �S t| �S d S r )r r r )�xr r r �wrap_value_or_type s r c C s t t| ��S )a� Inverts the given matcher to its logical negation.
:param match: The matcher to negate.
This matcher compares the evaluated object to the negation of the given
matcher. If the ``match`` argument is not a matcher, it is implicitly
wrapped in an :py:func:`~hamcrest.core.core.isequal.equal_to` matcher to
check for equality, and thus matches for inequality.
Examples::
assert_that(cheese, is_not(equal_to(smelly)))
assert_that(cheese, is_not(smelly))
)r
r ��matchr r r �is_not s r c C s t | �S )z�Alias of :py:func:`is_not` for better readability of negations.
Examples::
assert_that(alist, not_(has_item(item)))
)r r r r r �not_1 s r N)Z
__future__r �
__author__Z
__copyright__Z__license__Zhamcrest.core.base_matcherr r Z"hamcrest.core.helpers.wrap_matcherr r Zisequalr Zisinstanceofr r
r r r r r r r �<module> s