a ze@sVddlZddlmZGdddZGdddZGdddejZed krRedS) N) ALWAYS_EQc@seZdZddZdS)EmptycCsdS)NzselfrrE/opt/bitninja-python-dojo/embedded/lib/python3.9/test/test_compare.py__repr__szEmpty.__repr__N)__name__ __module__ __qualname__rrrrrrsrc@s$eZdZddZddZddZdS)CmpcCs ||_dSNarg)rrrrr__init__ sz Cmp.__init__cCs d|jS)Nzrrrrrr sz Cmp.__repr__cCs |j|kSr r)rotherrrr__eq__sz Cmp.__eq__N)r r r rrrrrrrr sr c@sneZdZddddedgZdgddegZeeZddZd d Z d d Z d dZ ddZ ddZ ddZdS)ComparisonTestg@y@)NcCsR|jD]F}|jD]:}||jvr(||jvs0||ur>|||q|||qqdSr ) candidatesset1 assertEqualZassertNotEqual)rabrrrtest_comparisonss   zComparisonTest.test_comparisonsc Csfg}tdD]}|t|dtq |D]4}|D]*}|||kt|t|kd||fq4q,dS)N rz a=%r, b=%r)rangeinsertlenrrid)rLirrrrrtest_id_comparisonss  z"ComparisonTest.test_id_comparisonscCsLtd}td}td}|||kd|||kd|||kddS)NrrTF)r assertIs)rrrcrrrtest_ne_defaults_to_not_eq)s z)ComparisonTest.test_ne_defaults_to_not_eqcsHgGfddd}Gfddd}||k|ddgdS)NcseZdZfddZdS)z2ComparisonTest.test_ne_high_priority..LeftcsdtS)N Left.__eq__appendNotImplementedargsZcallsrrr6s z9ComparisonTest.test_ne_high_priority..Left.__eq__Nr r r rrr.rrLeft4sr0cs$eZdZfddZfddZdS)z3ComparisonTest.test_ne_high_priority..RightcsdtS)Nz Right.__eq__r)r,r.rrr:s z:ComparisonTest.test_ne_high_priority..Right.__eq__csdtS)N Right.__ne__r)r,r.rr__ne__=s z:ComparisonTest.test_ne_high_priority..Right.__ne__Nr r r rr2rr.rrRight9s r4r(r1ZassertSequenceEqual)rr0r4rr.rtest_ne_high_priority1s  z$ComparisonTest.test_ne_high_prioritycsJgGfddd}Gfddd|}||k|ddgdS)NcseZdZfddZdS)z1ComparisonTest.test_ne_low_priority..BasecsdtS)N Base.__eq__r)r,r.rrrHs z8ComparisonTest.test_ne_low_priority..Base.__eq__Nr/rr.rrBaseFsr8cs$eZdZfddZfddZdS)z4ComparisonTest.test_ne_low_priority..DerivedcsdtS)NzDerived.__eq__r)r,r.rrrLs z;ComparisonTest.test_ne_low_priority..Derived.__eq__csdtS)NDerived.__ne__r)r,r.rrr2Os z;ComparisonTest.test_ne_low_priority..Derived.__ne__Nr3rr.rrDerivedKs r:r9r7r5)rr8r:rr.rtest_ne_low_priorityCs  z#ComparisonTest.test_ne_low_priorityc sdddfdddfdddfdd dfd d dff}|D]\}}|fd d Gfddd}|D]\}}||krpt||qp|dkr||tdnt||tWdq:1s0Yq:dS)NrcSs||kSr rrrrrrXz6ComparisonTest.test_other_delegation..__lt__cSs||kSr rr<rrrr=Yr>__le__cSs||kSr rr<rrrr=Zr>__gt__cSs||kSr rr<rrrr=[r>__ge__cSs||kSr rr<rrrr=\r>csddS)Nz!Unexpected operator method called)Zfailr,rrr unexpected`sz8ComparisonTest.test_other_delegation..unexpectedcseZdZZdS)z/ComparisonTest.test_other_delegation..CN)r r r r2r)rCrrCbsrDF)ZsubTestsetattrr%objectZ assertRaises TypeError)ropsnamefuncrDr_r)rrCrtest_other_delegationUs          z$ComparisonTest.test_other_delegationcCsBdd}||t|t|t}||t|t|dS)NcSsdSr rrrrrr=mr>z0ComparisonTest.test_issue_1393..)rrrF)rxyrrrtest_issue_1393ls    zComparisonTest.test_issue_1393)r r r r rrZset2rrr$r'r6r;rLrOrrrrrs r__main__) ZunittestZ test.supportrrr ZTestCaserr mainrrrrs   c