mò %U²Ic#@s²dZdklZdddddddd d d d d ddddddddddddddddddd d!d"d#d$g#Zd%fd&„ƒYZd'Zx eD]ZeeƒeiUq¢W[[eƒZ e d(d(e e d(d(e e d(d(e d(d)d*joe d(d(e n5e i d(ƒe i d(ƒe i d(ƒe i d(ƒe d(d(e e e d(ƒe d(e ƒe d(d(e e d(?d(e ?e d(>d(e >e d(@d(e @e d(Bd(e Be d(Ad(e Ad(e je d(d(e d(„ƒYZ$d?„Z%e%d@e&ƒe%dAe&ƒe%dBe&ƒe%dCe&ƒe%dDe&ƒe%dEe&ƒe%dFe&ƒdGfdH„ƒYZ'yee'ƒƒWne&j oedI‚nXyee'ƒƒWne&j oedI‚nXdJfdK„ƒYZ(ee(ƒƒdLfdM„ƒYZ)e%dNe&ƒdOfdP„ƒYZ*e%dQe&ƒdRfdS„ƒYZ+e+ƒe+_,e+ƒZ-y e-ƒWne.j on XedT‚dU„Z/dRfdV„ƒYZ+ye+ƒi-Wn;e0j o/Z1ee1ƒdWjodXGee1ƒGHqPnXdYfdZ„ƒYZ2e2ƒe2ƒjd[fd\„ƒYZ3y e3ƒWne0j o Z1nXd]GHd0S(^s@Test the functionality of Python classes implementing operators.(s TestFailedtaddtraddtsubtrsubtmultrmultdivtrdivtmodtrmodtdivmodtrdivmodtpowtrpowtrshifttrrshifttlshifttrlshifttandtrandtortrortxortrxortcontainstgetitemtgetslicetsetitemtsetslicetdelitemtdelslicetnegtpostabstinittAllTestscBsktZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d „Z d „Z d „Z RS( NcGsdG|GH|f|S(Ns __coerce__:(targstself(R%R$((t,/data/zmath/lib/python2.4/test/test_class.pyt __coerce__Ds cGsdG|GHtt|ƒƒS(Ns __hash__:(R$thashtidR%(R%R$((R&t__hash__Hs cGs dG|GHdS(Ns__str__:R#(R$(R%R$((R&t__str__Ls cGs dG|GHdS(Ns __repr__:R#(R$(R%R$((R&t__repr__Ps cGs dG|GHdS(Ns__int__:i(R$(R%R$((R&t__int__Ts cGs dG|GHdS(Ns __float__:f1.0(R$(R%R$((R&t __float__Xs cGs dG|GHdS(Ns __long__:l(R$(R%R$((R&t__long__\s cGs dG|GHdS(Ns__oct__:t01(R$(R%R$((R&t__oct__`s cGs dG|GHdS(Ns__hex__:t0x1(R$(R%R$((R&t__hex__ds cGs dG|GHdS(Ns__cmp__:i(R$(R%R$((R&t__cmp__hs cGs dG|GHdS(Ns__del__:(R$(R%R$((R&t__del__ls( t__name__t __module__R'R*R+R,R-R.R/R1R3R4R5(((R&R#Cs          sCdef __%(method)s__(self, *args): print "__%(method)s__:", args iiii*s The Answerii sA lotN.iidtStrangeitjavas"__getitem__: (slice(0, 42, None),)s/__setitem__: (slice(0, 42, None), 'The Answer')s"__delitem__: (slice(0, 42, None),)t ExtraTestscBs#tZd„Zd„Zd„ZRS(NcGs dG|GHdS(Ns __getattr__:tSomeVal(R$(R%R$((R&t __getattr__ûs cGs dG|GHdS(Ns __setattr__:(R$(R%R$((R&t __setattr__ÿscGs dG|GHdS(Ns __delattr__:(R$(R%R$((R&t __delattr__s(R6R7R<R=R>(((R&R:ús  sspam, spam, spam and hamt BadTypeClasscBs5tZd„ZeZeZeZeZeZeZRS(NcCsdS(N(tNone(R%((R&R- s( R6R7R-R.R/R+R,R1R3(((R&R? s cBs9y |dUWn|j onXed||f‚dS(sDRaise TestFailed if executing 'stmt' does not raise 'exception' Ns%s should raise %s(tstmtt exceptiont TestFailed(RARB((R&t check_excs  sint(BadTypeClass())sfloat(BadTypeClass())slong(BadTypeClass())sstr(BadTypeClass())srepr(BadTypeClass())soct(BadTypeClass())shex(BadTypeClass())tIntLongMixClasscBstZd„Zd„ZRS(NcCsdS(Nl((R%((R&R-*scCsdS(Ni((R%((R&R/-s(R6R7R-R/(((R&RE)s sTypeError should not be raisedtC0cBstZRS(N(R6R7(((R&RF=stC1cBstZd„ZRS(NcCsdS(Ni((R%tother((R&R4Cs(R6R7R4(((R&RGBss hash(C1())tC2cBstZd„ZRS(NcCsdS(Ni((R%RH((R&t__eq__Hs(R6R7RJ(((R&RIGss hash(C2())tAcBstZRS(N(R6R7(((R&RKNss-how could this not have overflowed the stack?cCs td‚dS(Ntbooh(tAttributeError(R%((R&RL\scBstZeeƒZRS(N(R6R7tpropertyRLta(((R&RK_sRLs%attribute error for A().a got masked:tEcBstZeeƒZRS(N(R6R7RNRLRJ(((R&RPgstIcBstZeeƒZRS(N(R6R7RNRLt__init__(((R&RQkss)attribute error for I.__init__ got masked(4t__doc__ttest.test_supportRCt testmethsR#tmethod_templatetmethodtlocalst__dict__ttestmeR't__div__t__rdiv__R t __getslice__t __setslice__t __delslice__tsystplatformR!tinttlongtfloattoctthexR(treprtstrR9tlangtSystemtgcR:tspamteggstcardinalR?RDt TypeErrorRERFRGRIRKt__call__ROt RuntimeErrorRLRMtxRPRQ(RER9RZRLR?RCRGRFRPRKRQRUR`RIRVRORDR:RWRrR#((R&t?s o>.           &(%