Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/test/__pycache__/test_compare.cpython-39.opt-2.pyc

a

��g��@sVddlZddlmZGdd�d�ZGdd�d�ZGdd�dej�Zed	krRe��dS)
�N)�	ALWAYS_EQc@seZdZdd�ZdS)�EmptycCsdS)Nz<Empty>���selfrr�-/usr/local/lib/python3.9/test/test_compare.py�__repr__szEmpty.__repr__N)�__name__�
__module__�__qualname__rrrrrrsrc@s$eZdZdd�Zdd�Zdd�ZdS)�CmpcCs
||_dS�N��arg)rrrrr�__init__	szCmp.__init__cCs
d|jS)Nz<Cmp %s>rrrrrrszCmp.__repr__cCs
|j|kSr
r)r�otherrrr�__eq__sz
Cmp.__eq__N)r	r
rrrrrrrrrsrc@sneZdZdddded�gZdgdde�gZeeZdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�ZdS)�ComparisonTest�g@y@�)�NcCsR|jD]F}|jD]:}||jvr(||jvs0||ur>|�||�q|�||�qqdSr
)�
candidates�set1�assertEqualZassertNotEqual)r�a�brrr�test_comparisonss


zComparisonTest.test_comparisonsc	Csfg}td�D]}|�t|�dt��q|D]4}|D]*}|�||kt|�t|�kd||f�q4q,dS)N�
rz
a=%r, b=%r)�range�insert�lenrr�id)r�L�irrrrr�test_id_comparisonss
�z"ComparisonTest.test_id_comparisonscCsLtd�}td�}td�}|�||kd�|�||kd�|�||kd�dS)NrrTF)r�assertIs)rrr�crrr�test_ne_defaults_to_not_eq)sz)ComparisonTest.test_ne_defaults_to_not_eqcsHg�G�fdd�d�}G�fdd�d�}|�|�k|��ddg�dS)NcseZdZ�fdd�ZdS)z2ComparisonTest.test_ne_high_priority.<locals>.Leftcs��d�tS)N�Left.__eq__��append�NotImplemented��args�Zcallsrrr6s
z9ComparisonTest.test_ne_high_priority.<locals>.Left.__eq__N�r	r
rrrr.rr�Left4sr0cs$eZdZ�fdd�Z�fdd�ZdS)z3ComparisonTest.test_ne_high_priority.<locals>.Rightcs��d�tS)NzRight.__eq__r)r,r.rrr:s
z:ComparisonTest.test_ne_high_priority.<locals>.Right.__eq__cs��d�tS)N�Right.__ne__r)r,r.rr�__ne__=s
z:ComparisonTest.test_ne_high_priority.<locals>.Right.__ne__N�r	r
rrr2rr.rr�Right9sr4r(r1�ZassertSequenceEqual)rr0r4rr.r�test_ne_high_priority1s
z$ComparisonTest.test_ne_high_prioritycsJg�G�fdd�d�}G�fdd�d|�}|�|�k|��ddg�dS)NcseZdZ�fdd�ZdS)z1ComparisonTest.test_ne_low_priority.<locals>.Basecs��d�tS)N�Base.__eq__r)r,r.rrrHs
z8ComparisonTest.test_ne_low_priority.<locals>.Base.__eq__Nr/rr.rr�BaseFsr8cs$eZdZ�fdd�Z�fdd�ZdS)z4ComparisonTest.test_ne_low_priority.<locals>.Derivedcs��d�tS)NzDerived.__eq__r)r,r.rrrLs
z;ComparisonTest.test_ne_low_priority.<locals>.Derived.__eq__cs��d�tS)N�Derived.__ne__r)r,r.rrr2Os
z;ComparisonTest.test_ne_low_priority.<locals>.Derived.__ne__Nr3rr.rr�DerivedKsr:r9r7r5)rr8r:rr.r�test_ne_low_priorityCs
z#ComparisonTest.test_ne_low_priorityc	s�ddd�fddd�fddd�fdd	d�fd
dd�ff}|D]�\}}��|����fdd
��G�fdd�d�}|D]\}}||krpt||��qp|dkr���||�t��d�n��t||�t��Wd�q:1s�0Yq:dS)NrcSs||kSr
r�rrrrr�<lambda>X�z6ComparisonTest.test_other_delegation.<locals>.<lambda>�__lt__cSs||kSr
rr<rrrr=Yr>�__le__cSs||kSr
rr<rrrr=Zr>�__gt__cSs||kSr
rr<rrrr=[r>�__ge__cSs||kSr
rr<rrrr=\r>cs��d�dS)Nz!Unexpected operator method called)Zfailr,rrr�
unexpected`sz8ComparisonTest.test_other_delegation.<locals>.unexpectedcseZdZ�ZdS)z/ComparisonTest.test_other_delegation.<locals>.CN)r	r
rr2r)rCrr�CbsrDF)ZsubTest�setattrr%�objectZassertRaises�	TypeError)r�ops�name�funcrDr�_r)rrCr�test_other_delegationUs 




�z$ComparisonTest.test_other_delegationcCsBdd�}|�|t�|�t|�t�}|�|t�|�t|�dS)NcSsdSr
rrrrrr=mr>z0ComparisonTest.test_issue_1393.<locals>.<lambda>)rrrF)r�x�yrrr�test_issue_1393lszComparisonTest.test_issue_1393)r	r
rrrrZset2rrr$r'r6r;rLrOrrrrrs
r�__main__)	ZunittestZtest.supportrrrZTestCaserr	�mainrrrr�<module>s
c

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists