mò %U²Ic@stdklZdkZdklZdadd„ZdgZx?eddƒD].Z de Z ei ee de dƒƒqNWei ddd gƒd e fd „ƒYZ d e fd „ƒYZx0eD](Z ee ƒZeo dGe GHneZedeeƒeZeiƒedeeƒeZeieƒedeeƒeZeiƒeZedeed„ƒeodGHdGHneZeid„ƒedeeƒgZeD]Zee eƒqÀ[ZeZeieƒee _eZyeiƒWnej o eZnXeoee _edeeƒngZee ƒD]Zeeeidƒeƒq^[ZgZeD]Zeeeifq‘[Z e iƒgZe D]\ZZeeqÅ[ZedeeƒqÉWdk!Z!dk"l#Z#dk$Z$de!i%fd„ƒYZ&de!i%fd„ƒYZ'dd„Z(e)d joe(d!eƒndS("(sverboseN(sUserListicCs to dG|GHn|}|o|i|ƒn |iƒt|ƒt|ƒjoCdG|GHdGt|ƒGt|ƒGH|GH|GH|GHtd7adSnxlt |ƒD]^\}}||}||j o;dG|GHdG|G|G|GH|GH|GH|GHtd7adSq¦q¦WdS(Ns checkingserror inslength mismatch;isout of order at index( tverbosettagtrawtorigtcomparetsorttlentexpectedtnerrorst enumeratetitgoodtmaybe(RRRRR R R R((t+/data/zmath/lib/python2.4/test/test_sort.pytchecks4         ii iidièt ComplainscBs)tZeZd„Zd„Zd„ZRS(NcCs ||_dS(N(R tself(RR ((R t__init__1scCsOtio5tiƒdjo"todG|G|GHnt‚n|i|ijS(Nf0.001s complaining at(Rtmaybe_complaintrandomRRtothert RuntimeErrorR (RR((R t__lt__4s  cCs d|iS(Ns Complains(%d)(RR (R((R t__repr__;s(t__name__t __module__tTrueRRRR(((R R.s  tStablecBs#tZd„Zd„Zd„ZRS(NcCs||_||_dS(N(tkeyRR tindex(RRR ((R R?s cCst|i|iƒS(N(tcmpRRR(RR((R t__cmp__CscCsd|i|ifS(NsStable(%d, %d)(RRR(R((R RFs(RRRRR(((R R>s  s Testing sizetidentitytreversedsrandom permutationsreversed via functioncCs t||ƒS(N(Rtbta(R#R"((R t\ss3 Checking against an insane comparison function.s? If the implementation isn't careful, this may segfault.cCsttiƒdƒdS(Nii(tintR(R#R"((R R$bss(an insane function left some permutations+exception during sort left some permutationt stability(s test_supporttTestBugscBs#tZd„Zd„Zd„ZRS(NcsWdf‡d†ƒY}g}tdƒD]}||ƒq'~‰|itˆiƒdS(NtCcstZ‡d†ZRS(NcsEˆo!tiƒdjoˆiƒnˆidƒtiƒdjS(Nf0.75if0.5(tLRtpoptappend(RR(R)(R R‡s (RRR((R)(R R(†si2( R(t_[1]trangeR R)Rt assertRaisest ValueErrorR(RR(R R)R,((R)R ttest_bug453523s*cCs@tdƒ}ti|ƒ|idƒ|i|tdƒƒdS(Ni2(R-R)RtshuffleRtNoneRt assertEqual(RR)((R t test_cmpNone‘s   cszg}xmtdƒD]_}‡d†}ddg‰|itˆi|ƒ‡d†}|itˆi|ƒ|g}qWdS(Nics$ˆidƒˆiƒt||ƒS(Ni(R)R+R*Rtxty(R5R6(R)(R t mutating_cmps  iicsˆidƒˆ2t||ƒS(Ni(R)R+RR5R6(R5R6(R)(R R7£s ( t memorywasterR-R R7R)RR.R/R(RR7R R8R)((R)R ttest_undetected_mutation™s    (RRR0R4R9(((R R's  tTestDecorateSortUndecoratecBsktZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d „Z d „Z d „Z RS( NcCsJdiƒ}|}ti|ƒ|idtiƒ|idd„ƒdS(Ns,The quick Brown fox Jumped over The lazy DogRRcCst|iƒ|iƒƒS(N(RR5tlowerR6(R5R6((R R$³s(tsplittdatatcopyRR1RtstrR;(RR>R=((R ttest_decorated®s   cCs,diƒ}|it|idd„ƒdS(Ns,The quick Brown fox Jumped over The lazy DogcCsdS(Ni((R5R6((R R$·s(R<R=RR.t TypeErrorRR2(RR=((R ttest_baddecoratorµs cCsng}tdƒD]}|tidƒ|fq~}|}|idd„ƒ|iƒ|i ||ƒdS(NiÈidRcCs|\}}|S(N(R5R6(t.0R5R6((R R$¼s( R,txrangeR Rt randrangeR=R>RRR3(RR R,R>R=((R ttest_stability¹s 6 cs5‡d†}diƒ}|id|dtiƒdS(Ncs9ˆit|ƒtƒˆit|ƒtƒt||ƒS(N(RR3ttypeR5R?RR6(R5R6(R(R RÂss,The quick Brown fox Jumped over The lazy DogRR(RR<R=RR?R;(RR=R((RR ttest_cmp_and_key_combinationÀs  cCs,diƒ}|it|idtiƒdS(Ns,The quick Brown fox Jumped over The lazy Dogtbad(R<R=RR.RARR?R;(RR=((R ttest_badcmp_with_keyÉs cCsFtddƒ}|}|it|idd„ƒ|i||ƒdS(NiþÿÿÿicCsd|S(Ni(R5(R5((R R$Òs( R-R=tdupRR.tZeroDivisionErrorRR2R3(RRKR=((R ttest_key_with_exceptionÎscs5tdƒ‰‡d†}|itˆid|ƒdS(Ni csˆ2tdƒˆ(|S(Ni(R=R-R5(R5(R=(R tk×s R(R-R=RNRR.R/R(RRNR=((R=R ttest_key_with_mutationÕs  csBtdƒ‰dtf‡d†ƒY}|itˆid|ƒdS(Ni t SortKillercstZd„Z‡d†ZRS(NcCsdS(N((RR5((R Ràscsˆ2tdƒˆ(dS(Ni(R=R-(R(R=(R t__del__âs(RRRRQ((R=(R RPßs R(R-R=tobjectRPRR.R/R(RRPR=((R=R ttest_key_with_mutating_delÝs csBtdƒ‰dtf‡d†ƒY}|itˆid|ƒdS(Ni RPcstZd„Z‡d†ZRS(NcCs|djo t‚ndS(Ni(R5R(RR5((R Rës csˆ2tdƒˆ(dS(Ni(R=R-(R(R=(R RQîs(RRRRQ((R=(R RPês R(R-R=RRRPRR.RR(RRPR=((R=R t(test_key_with_mutating_del_and_exceptionçs cCs_tdƒ}ti|ƒ|idtƒ|i|tdddƒƒ|it |idƒdS(Nidtreverseiciÿÿÿÿs wrong type( R-R=RR1RRRR3R.RA(RR=((R t test_reverseûs   cCs­g}tdƒD]}|tidƒ|fq~}|}|}|idd„dt ƒ|idd„ƒ|i ||ƒ|idd„dt ƒ|i ||ƒdS( NiÈidRcCst|d|dƒS(Ni(RR5R6(R5R6((R R$sRUcCst|d|dƒS(Ni(RR6R5(R5R6((R R$sRcCs|dS(Ni(R5(R5((R R$ s( R,RDR RRER=tcopy1tcopy2RRRR3(RR R,RWR=RX((R ttest_reverse_stabilitys6( RRR@RBRFRHRJRMRORSRTRVRY(((R R:¬s        cCs—ttf}ti|Œ|osttdƒocdk}dgd}xAt t |ƒƒD]-}ti|Œ|iƒtiƒ||