ó 2xQc@s|ddlmZdejfd„ƒYZdefd„ƒYZdd„Zedkrxdd lmZeƒeƒnd S( iÿÿÿÿ(tsupporttTestCasecBseZRS((t__name__t __module__(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyRst FirstCasecBseeZd„Zd„Zd„Zd„Zd„Zd„Zdd„Zd„Z d „Z d „Z RS( c Csó|jj}d|_|jddddddƒ}|j|j@}||}dd d „ƒY}|j|jgƒ}d dl}|jd ƒ}x\dD]T} t || j ƒ} t | ƒ} |j | || j ƒ|j || @|| ƒq—WdS(Nshp.ittasdfg333333 @gš™™™™™ @itCcBseZRS((RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyR-siÿÿÿÿtRcsi((ii( theapytUsetreprefixtisotTypetSizet__dict__ttypestbytreprtkindtevaltaseq( tselfthptattstkRtdiRtdbtitrktek((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyttest_1s      c Cs|jj}d|_dd"d„ƒY}dtfd„ƒY}|ƒ}|ƒ}ddl}x<d#D]4}t|ƒ}t|ƒ} |jt| ƒ|ƒqcWxxtd$ƒD]j\} }| d } t|ƒ}t |j ƒd!} |j| j | ƒt|ƒ} |jt| ƒ|ƒq¨WdS(%s, Systematically test all kind constructors: shp.RcBseZRS((RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyREstTcBseZRS((RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyR!HsiÿÿÿÿNs hp.Class(C)shp.Class(C).dictofshp.Clodo(dictof=C)shp.Clodo(dictof=T)shp.Clodo(dictof=())s hp.Clodo(C)s hp.Clodo(T)s hp.Id(id(c))shp.Module("sys")s&hp.Rcs(hp.Clodo.sokind(int)(dictof=C))shp.Size(hp.iso(c).indisize)s"hp.Size(hp.iso(C).indisize).dictofs hp.Type(T)s hp.Type(int)s hp.Unity()shp.Via()s hp.Via('_.x')shp.Via('_[0]')shp.Via('_.keys()[0]')shp.Via('_->abc')shp.Via('_.__dict__.keys()[0]')shp.Via('_.f_locals["abc"]')shp.Via('_.f_locals ["abc"]')shp.Via('_->f_valuestack[0]')ii((s hp.Class(C)shp.Class(C).dictofshp.Clodo(dictof=C)shp.Clodo(dictof=T)shp.Clodo(dictof=())s hp.Clodo(C)s hp.Clodo(T)s hp.Id(id(c))shp.Module("sys")s&hp.Rcs(hp.Clodo.sokind(int)(dictof=C))shp.Size(hp.iso(c).indisize)s"hp.Size(hp.iso(C).indisize).dictofs hp.Type(T)s hp.Type(int)s hp.Unity()shp.Via()(s hp.Via('_.x')shp.Via('_[0]')shp.Via('_.keys()[0]')shp.Via('_->abc')shp.Via('_.__dict__.keys()[0]')shp.Via('_.f_locals["abc"]')shp.Via('_.f_locals ["abc"]')shp.Via('_->f_valuestack[0]')( R R R tobjecttsysRRRt enumeratetlisttargR( RRRR!tcttR#tstxtrxRtcodetrel((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyttest_2>sT           c Csv|jj}ddd„ƒY}dtfd„ƒY}|ƒ}|ƒ}i}|j|j|j|ƒ}xÐ||fD]Â}|j} x°|jd| ƒ|j| ƒj|j |j|ƒj ƒj|j|ƒj j j|j|ƒj j |j| ƒ@j|j|jƒj fD]&} |j || @|j|jƒƒq WquWx4|jjfD]#} |j || @|j|ƒƒqKWdS(s Test of dictof RcBseZRS((RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyR„sR!c BseZd ZRS( RRtbR'tdtetftgth( RRR/R'R0R1R2R3R4(RRt __slots__(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyR!‡stdictofN((R R R"R Rt __class__tClodotClassR6RtindisizetbysizeRRtNothing( RRRR!R'R(tdntisodR*tXR((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyttest_3~s*    "(cCsfddd„ƒY}|ƒ}|jj}|j|jƒ}|jdƒj}|jt|ƒdƒdS(s Test of via RcBseZRS((RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyRªstViashpy().Via('.__dict__')N((R R R RRRRR(RRR'RR>R*((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyttest_4¦s   cCsÑddd„ƒY}|ƒ}i}|g}|j|ƒ||_|jj}d|_|j|j|||j|ƒ|jj|ƒj @}|j|j|||j|ƒ|j j|ƒj @}|j ||ƒ|j|j|||j|ƒj |j j j ƒ}xgt t|ƒƒD]S} || j}t|ƒ} t| ƒ} |j || ƒ|j || @|| ƒqWddl} | j} ~ |j| ƒ}|j |jjj ƒ}|j |tt|jƒƒ@|ƒdS(s6 Non-systematic tests that came up around Sep 14 2005 RcBseZRS((RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyR¹sshp.iÿÿÿÿN((tappendtcrefR R R R RR9tsokindtrefdbyR8RRtrangetlenRRRR#tpathtModuleR6(RRR'R0RDRRR/R)RtrateraR#tpR*((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyttest_5¶s2      443      c Csddd„ƒY}|ƒ}i}|g}|j|ƒ||_|jj}d|_ddl}|j|j|||j||ƒ}xtdddd d dd ddf D]P}t|t ƒrÑ|d \}} nd} t ||ƒ} |j | || ƒq©WdS(s Test of .refdby on all others RcBseZRS((RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyRçsshp.iÿÿÿÿNtUnityR9R8tIdRJRiRR RAii((Ri( RCRDR R R R#R Rt isinstancettupletgetattrter_test( RRR'R0RDRR#R)tpretlevelter((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyttest_6äs2       $ic Csý|jj}t|ƒ}|jt|ƒ|ƒxy|fD]n}|j|ƒ}|j}t|ƒ} t| ƒ} |j| |ƒ|j||@|ƒ|j|| @|ƒq8W|j} |j} |dkrù|j | ||dƒ|j | ||dƒndS(Nii( R R RRRRRRFR6RT( RRWtsetRVRtrerR)tsbytsktrsktsket er_refdbyt er_dictof((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyRT s         c CsÀ|jj}ddd„ƒY}d|fd„ƒY}d|fd„ƒY}dtfd„ƒY}d |fd „ƒY}d |fd „ƒY}|ƒ}|ƒ} |ƒ} |ƒ} |ƒ} |ƒ} |jgi|| | | | | | jƒ }x¿|jd ƒ|j|ƒ|j|ƒ|jj|ƒj fD]}|j dƒ}|j dƒ}|j dƒ}|j dƒ}|j dƒ}x-|||||||@fD]}||@q™Wq*W|jj|ƒj }ddl }|j ƒ|j |j dƒjƒ}|j |j dƒjƒ}|j|j| jƒ|dkƒ|j||kƒ|j ƒ|j |j dƒjƒ}|j |j dƒjƒ}|j|j| jƒ|dkƒ|j||kƒdS(s# Test of alternative sets w. biper RcBseZRS((RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyR0stDcBseZRS((RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyRa3stEcBseZRS((RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyRb6sR!cBseZRS((RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyR!9stUcBseZRS((RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyRc<stVcBseZRS((RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyRd?si t=s!=iÿÿÿÿNii((R R R"R RRR9R RERFtalttgctcollectRtbipertassert_(RRRRaRbR!RcRdR'R0R1R(tutvR)RtlttletgetgttneRRgR/((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyttest_7+sL       *   $   # #c Cs|jj}ddd„ƒY}|ƒ}g}i}|j|||dƒ}x´|j|ƒdf|jtƒdf|j|ƒdf|j||ƒdf|jtƒ|j|ƒBdffD]B\}}|j|jƒ} |j| |j j j j d|ƒq½WdS(s Test of findex and biper RcBseZRS((RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyRsiiN(( R R R R9R tdictRRiRRtfamt classifiertkinds( RRRR'tliRR)RRRM((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyttest_8ys  /c CsYddlm}ddddddd d d g }|ƒ}g|D]}|t||ƒf^qA}|jd |j|j@fƒdd lm}|ƒ}|djdƒIx%|D]}||djdƒIq²W|Jxe|D]]} || djdƒIx9|D]1}|t| d|dkƒd jdƒIqW|JqÞW|j |j ƒdƒdS(s Test the subrelation relation iÿÿÿÿ(thpyR9R8RPtIdsetRJRRR ROs Size&Type(tStringIORi iiisë Class Clodo Id Idset Module Rcs Size Type Unity Size&Type Class F F F F F F F T T F Clodo T F F F F F F T T F Id F F F F F F F F T F Idset F F F F F F F F T F Module F F F F F F F F T F Rcs F F F F F F F F T F Size F F F F F F F F T F Type F F F F F F F F T F Unity F F F F F F F F F F Size&Type F F F F F F T T T F N( tguppyRyRSRCRR R{tljusttstrRtgetvalue( RRyternamesRtnametersR{R2R/R((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyttest_9“s(    (    / ( RRR R.R@RBRNRXRTRrRxRƒ(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyRs ) @ (  . % " N icCstjt|ƒdS(N(Rt run_unittestR(tdebug((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyt test_mainºst__main__(toffN(tguppy.heapy.testRRRR†Rtguppy.heapy.RemoteRˆ(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_ER.pyt sÿ©