Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 13.58.247.196
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_compare.cpython-310.pyc
o

`b��@sZddlZddlmZGdd�d�ZGdd�d�ZGdd�dej�Zed	kr+e��dSdS)
�N)�	ALWAYS_EQc@seZdZdd�ZdS)�EmptycCsdS)Nz<Empty>���selfrr�:/usr/local/python-3.10/lib/python3.10/test/test_compare.py�__repr__szEmpty.__repr__N)�__name__�
__module__�__qualname__rrrrrrsrc@s$eZdZdd�Zdd�Zdd�ZdS)�CmpcCs
||_dS�N��arg)rrrrr�__init__	�
zCmp.__init__cCs
d|jS)Nz<Cmp %s>rrrrrrrzCmp.__repr__cCs
|j|kSr
r)r�otherrrr�__eq__rz
Cmp.__eq__N)r	r
rrrrrrrrrsrc@sneZdZdddded�gZdgdde�gZeeZdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�ZdS)�ComparisonTest�g@y@�)�NcCsR|jD]#}|jD]}||jvr||jvs||ur|�||�q|�||�qqdSr
)�
candidates�set1�assertEqualZassertNotEqual)r�a�brrr�test_comparisonss

��zComparisonTest.test_comparisonsc	Csfg}td�D]
}|�t|�dt��q|D]}|D]}|�||kt|�t|�kd||f�qqdS)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)z;object.__ne__() should allow reflected __ne__() to be triedc�eZdZ�fdd�ZdS)z2ComparisonTest.test_ne_high_priority.<locals>.Leftc���d�tS)N�Left.__eq__��append�NotImplemented��args�Zcallsrrr6�
z9ComparisonTest.test_ne_high_priority.<locals>.Left.__eq__N�r	r
rrrr1rr�Left4�r4c�$eZdZ�fdd�Z�fdd�ZdS)z3ComparisonTest.test_ne_high_priority.<locals>.Rightcr*)NzRight.__eq__r,r/r1rrr:r2z:ComparisonTest.test_ne_high_priority.<locals>.Right.__eq__cr*)N�Right.__ne__r,r/r1rr�__ne__=r2z:ComparisonTest.test_ne_high_priority.<locals>.Right.__ne__N�r	r
rrr8rr1rr�Right9�r:r+r7N�ZassertSequenceEqual)rr4r:rr1r�test_ne_high_priority1s
z$ComparisonTest.test_ne_high_prioritycsJg�G�fdd�d�}G�fdd�d|�}|�|�k|��ddg�dS)z4object.__ne__() should not invoke reflected __eq__()cr))z1ComparisonTest.test_ne_low_priority.<locals>.Basecr*)N�Base.__eq__r,r/r1rrrHr2z8ComparisonTest.test_ne_low_priority.<locals>.Base.__eq__Nr3rr1rr�BaseFr5r?cr6)z4ComparisonTest.test_ne_low_priority.<locals>.Derivedcr*)NzDerived.__eq__r,r/r1rrrLr2z;ComparisonTest.test_ne_low_priority.<locals>.Derived.__eq__cr*)N�Derived.__ne__r,r/r1rrr8Or2z;ComparisonTest.test_ne_low_priority.<locals>.Derived.__ne__Nr9rr1rr�DerivedKr;rAr@r>Nr<)rr?rArr1r�test_ne_low_priorityCs
z#ComparisonTest.test_ne_low_priorityc	s�ddd�fddd�fddd�fdd	d�fd
dd�ff}|D]S\}}��|��B�fdd
��G�fdd�d�}|D]\}}||krFt||��q8|dkrW��||�t��d�n
��t||�t��Wd�n1skwYqdS)z8No default delegation between operations except __ne__()rcSs||kSr
r�rrrrr�<lambda>X�z6ComparisonTest.test_other_delegation.<locals>.<lambda>�__lt__cSs||kSr
rrCrrrrDYrE�__le__cSs||kSr
rrCrrrrDZrE�__gt__cSs||kSr
rrCrrrrD[rE�__ge__cSs||kSr
rrCrrrrD\rEcs��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
rr8r)rJrr�CbsrKFN)ZsubTest�setattrr&�objectZassertRaises�	TypeError)r�ops�name�funcrKr�_r)rrJr�test_other_delegationUs*




������z$ComparisonTest.test_other_delegationcCsBdd�}|�|t�|�t|�t�}|�|t�|�t|�dS)NcSsdSr
rrrrrrDmsz0ComparisonTest.test_issue_1393.<locals>.<lambda>)rrrM)r�x�yrrr�test_issue_1393lszComparisonTest.test_issue_1393)r	r
rrrrZset2rrr%r(r=rBrSrVrrrrrs
r�__main__)	ZunittestZtest.supportrrrZTestCaserr	�mainrrrr�<module>s
c�
© 2025 GrazzMean