Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/test/__pycache__/test_compare.cpython-38.pyc
U

>��gJ�@sXddlZGdd�d�ZGdd�d�ZGdd�d�ZGdd	�d	ej�Zed
krTe��dS)�Nc@seZdZdd�ZdS)�EmptycCsdS)Nz<Empty>���selfrr�0/opt/cppython/lib/python3.8/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>r
rrrrrszCmp.__repr__cCs
|j|kSrr
�r�otherrrr�__eq__sz
Cmp.__eq__N)rr	r
rrrrrrrrsrc@seZdZdd�Zdd�ZdS)�AnythingcCsdS)NTrrrrrrszAnything.__eq__cCsdS)NFrrrrr�__ne__szAnything.__ne__N�rr	r
rrrrrrrsrc@sneZdZdddded�gZdgdde�gZeeZdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�ZdS)�ComparisonTest�g@y@�)�NcCsR|jD]F}|jD]:}||jkr(||jks0||kr>|�||�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_comparisons%s
�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)z;object.__ne__() should allow reflected __ne__() to be triedcseZdZ�fdd�ZdS)z2ComparisonTest.test_ne_high_priority.<locals>.Leftcs��d�tS)N�Left.__eq__��append�NotImplemented��args�Zcallsrrr<s
z9ComparisonTest.test_ne_high_priority.<locals>.Left.__eq__N�rr	r
rrr1rr�Left:sr3cs$eZdZ�fdd�Z�fdd�ZdS)z3ComparisonTest.test_ne_high_priority.<locals>.Rightcs��d�tS)NzRight.__eq__r,r/r1rrr@s
z:ComparisonTest.test_ne_high_priority.<locals>.Right.__eq__cs��d�tS)N�Right.__ne__r,r/r1rrrCs
z:ComparisonTest.test_ne_high_priority.<locals>.Right.__ne__Nrrr1rr�Right?sr5r+r4N�ZassertSequenceEqual)rr3r5rr1r�test_ne_high_priority7s
z$ComparisonTest.test_ne_high_prioritycsJg�G�fdd�d�}G�fdd�d|�}|�|�k|��ddg�dS)z4object.__ne__() should not invoke reflected __eq__()cseZdZ�fdd�ZdS)z1ComparisonTest.test_ne_low_priority.<locals>.Basecs��d�tS)N�Base.__eq__r,r/r1rrrNs
z8ComparisonTest.test_ne_low_priority.<locals>.Base.__eq__Nr2rr1rr�BaseLsr9cs$eZdZ�fdd�Z�fdd�ZdS)z4ComparisonTest.test_ne_low_priority.<locals>.Derivedcs��d�tS)NzDerived.__eq__r,r/r1rrrRs
z;ComparisonTest.test_ne_low_priority.<locals>.Derived.__eq__cs��d�tS)N�Derived.__ne__r,r/r1rrrUs
z;ComparisonTest.test_ne_low_priority.<locals>.Derived.__ne__Nrrr1rr�DerivedQsr;r:r8Nr6)rr9r;rr1r�test_ne_low_priorityIs
z#ComparisonTest.test_ne_low_priorityc
s�ddd�fddd�fddd�fdd	d�fd
dd�ff}|D]�\}}��|��z�fdd
��G�fdd�d�}|D]\}}||krpt||��qp|dkr���||�t��d�n��t||�t��W5QRXq:dS)z8No default delegation between operations except __ne__()rcSs||kSrr�rrrrr�<lambda>^�z6ComparisonTest.test_other_delegation.<locals>.<lambda>�__lt__cSs||kSrrr=rrrr>_r?�__le__cSs||kSrrr=rrrr>`r?�__gt__cSs||kSrrr=rrrr>ar?�__ge__cSs||kSrrr=rrrr>br?cs��d�dS)Nz!Unexpected operator method called)Zfailr/rrr�
unexpectedfsz8ComparisonTest.test_other_delegation.<locals>.unexpectedcseZdZ�ZdS)z/ComparisonTest.test_other_delegation.<locals>.CN)rr	r
rr)rDrr�ChsrEFN)ZsubTest�setattrr(�objectZassertRaises�	TypeError)rZops�name�funcrEr�_r)rrDr�test_other_delegation[s 




�z$ComparisonTest.test_other_delegationcCsJdd�}|�|t��|�t�|�t�}|�|t��|�t�|�dS)NcSsdSrrrrrrr>sr?z0ComparisonTest.test_issue_1393.<locals>.<lambda>)rrrG)r�x�yrrr�test_issue_1393rszComparisonTest.test_issue_1393)rr	r
rrrZset2rrr'r*r7r<rLrOrrrrrs
r�__main__)ZunittestrrrZTestCaserr�mainrrrr�<module>s
c

F1le Man4ger