ó ;œPc@s´ddlmZddlZddlZddlZddlZdejfd„ƒYZdefd„ƒYZdefd„ƒYZd d „Z d „Z e d kr°e ƒndS( iÿÿÿÿ(tsupportNtTestCasecBs,eZd„Zd„Zd„Zd„ZRS(cCs2tjj|ƒ|jj|_|jj|_dS(N(RRtsetUptheapytRefPattUsetiso(tself((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyRsc CsÉg}g}x$t|ƒD]}|j|gƒqW|g|}xvt|dƒD]d}g}xOt|ƒD]A}g}|j|ƒx%t|ƒD]} |j|| ƒqWqjW|}qQW|} | |fS(Ni(trangetappend( Rtwidthtlengthtdsttlstitxstjtystktsrc((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyt makegraph s    c CsÉg}g}x$t|ƒD]}|j|gƒqW|g|}xvt|dƒD]d}g}xOt|ƒD]A}g}|j|ƒx%t|ƒD]} |j|| ƒqWqjW|}qQW|} | |fS(Ni(RR ( RR R R R RRRRRR((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyR$s    cKsX|j}|dk r$||ƒ}n||ƒjd||}d„|jjj_|S(NRcSsdS(Ns
((ta((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pytCs(RtNonetget_rptmodtUniSett summary_strt str_address(RR RtkwdsRtrp((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyR>s   (t__name__t __module__RRR(((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyRs   t RefPatCasecBs,eZd„Zd„Zd„Zd„ZRS(cCsêg}}|g}x*tdƒD]}|g}|j|ƒq W|j||ddƒ}xFt|ƒD]8\}}|t|ƒkre|j|||jƒqeqeW|j|dj|dƒ|j|dj|dƒ|j||ddƒ}|j|dj|dƒ|j|dj|dƒ|jt|ƒt|ƒdƒ|j||ddƒ}|jt|ƒt|ƒdƒ|j|jj|dƒ|j|j j|dƒ|j||ddƒ}|j|j j|dƒ|j|j j|dƒ|dj|dƒ|j j ƒ|j j |j|dƒƒ|j|j j|dƒg}|j|ƒ|g}|j||ƒ}|j|jj|ƒ|j|j |j||ƒƒ|j|j |j ƒ|j|j |dƒdS( Nitdepthi iiþÿÿÿiÿÿÿÿii(RR Rt enumeratetlentasisttheonetaseqt_Rta2tViewtclear_retainerstupdate_referrersR(RR RtlistsRRtx((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyttest_basic_methodsHsD        c s…tjƒ‰g}‡fd†‰ˆj}d‡‡fd†}g}|j|ƒ|||ƒx-tdƒD]}|}g}|j|ƒqlW|||ƒˆjddƒ\}}|||ddƒˆjddƒ\}}|||ddƒ}ˆt|jƒƒˆjdd ƒ\}}|||dd ƒ}|j}ˆt|ƒƒˆt|jƒƒ|j} ˆt| ƒƒ|j} ˆt| jƒƒˆt| jƒƒˆ| j ƒˆ| j ƒˆjdd ƒ\}}|||ddƒ}ˆ|jƒˆ|jjƒˆjdd ƒ\}}|||dd ƒ}ˆ|jƒˆj ||dd ƒ}ˆ|jƒˆj ˆj ƒd ƒdS(Ncsˆ|IJdS(N((R.(toutput(sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pytwrite“scs)ˆj|||}ˆt|ƒƒ|S(N(Rtrepr(R RtresultRR(RR1(sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyttest_pp—siiR"i iiii#iisòReference Pattern by <[dict of] class>. 0: _ --- [-] 1 list:
*0 1: a [-] 1 list:
*1 2: aa ---- [R] 1 tuple:
*1 Reference Pattern by <[dict of] class>. 0: _ --- [-] 1 list:
*0 1: a [-] 1 list:
*1 2: aa ---- [-] 1 list:
*1 3: a3 [-] 1 list:
*1 4: a4 ------ [-] 1 list:
*1 5: a5 [-] 1 list:
*1 6: a6 -------- [-] 1 list:
*1 7: a7 [R] 1 tuple:
*1 Reference Pattern by <[dict of] class>. 0: _ --- [-] 1 list:
*0 1: a [-] 5 list:
*5,
*5,
*5,
*5... 2: aa ---- [-] 5 list:
*5,
*5,
*5,
*5... 3: a3 [-] 5 list:
*5,
*5,
*5,
*5... 4: a4 ------ [-] 5 list:
*5,
*5,
*5,
*5... 5: a5 [-] 5 list:
*5,
*5,
*5,
*5... 6: a6 -------- [-] 5 list:
*5,
*5,
*5... 7: a7 [-] 1 list:
*5 8: a8 ---------- [R] 1 tuple:
*1 Reference Pattern by <[dict of] class>. 0: _ --- [-] 1 list:
*0 1: a [-] 5 list:
*5,
*5,
*5,
*5... 2: aa ---- [-] 5 list:
*5,
*5,
*5,
*5... 3: a3 [-] 5 list:
*5,
*5,
*5,
*5... 4: a4 ------ [-] 5 list:
*5,
*5,
*5,
*5... 5: a5 [-] 5 list:
*5,
*5,
*5,
*5... 6: a6 -------- [-] 5 list:
*5,
*5,
*5... 7: a7 [-] 5 list:
*5,
*5,
*5... 8: a8 ---------- [-] 5 list:
*5,
*5,
*5... 9: a9 [-] 5 list:
*5,
*5,
*5... 10: a10 ----------- [-] 5 list:
*5,
*5,
*5... 11: a11 [-] 5 list:
*5,
*5,
*5... 12: a12 ------------- [-] 5 list:
*5,
*5,
*5... 13: a13 [-] 5 list:
*5,
*5,
*5... 14: a14 --------------- [-] 5 list:
*5,
*5,
*5... 15: a15 [-] 5 list:
*5,
*5,
*5... 16: a16 ----------------- [-] 5 list:
*5,
*5,
*5... 17: a17 [+] 1 list:
*5 Reference Pattern by <[dict of] class>. 0: _ --- [-] 1 list:
*0 1: a [-] 1 list:
*1 2: aa ---- [-] 1 list:
*1 3: a3 [-] 1 list:
*1 4: a4 ------ [-] 1 list:
*1 5: a5 [-] 1 list:
*1 6: a6 -------- [-] 1 list:
*1 7: a7 [-] 1 list:
*1 8: a8 ---------- [-] 1 list:
*1 9: a9 [-] 1 list:
*1 10: a10 ----------- [-] 1 list:
*1 11: a11 [-] 1 list:
*1 12: a12 ------------- [-] 1 list:
*1 13: a13 [-] 1 list:
*1 14: a14 --------------- [-] 1 list:
*1 15: a15 [-] 1 list:
*1 16: a16 ----------------- [-] 1 list:
*1 17: a17 [-] 1 list:
*1 18: a18 ------------------- [-] 1 list:
*1 19: a19 [-] 1 list:
*1 20: a20 --------------------- [-] 1 list:
*1 21: a21 [-] 1 list:
*1 22: a22 ----------------------- [-] 1 list:
*1 23: a23 [-] 1 list:
*1 24: a24 ------------------------- [-] 1 list:
*1 25: a25 [-] 1 list:
*1 26: a26 --------------------------- [-] 1 list:
*1 27: a27 [-] 1 list:
*1 28: a28 ----------------------------- [-] 1 list:
*1 29: a29 [-] 1 list:
*1 20: a20 --------------------- [-] 1 list:
*1 21: a21 [-] 1 list:
*1 22: a22 ----------------------- [-] 1 list:
*1 23: a23 [-] 1 list:
*1 24: a24 ------------------------- [-] 1 list:
*1 25: a25 [-] 1 list:
*1 26: a26 --------------------------- [-] 1 list:
*1 27: a27 [-] 1 list:
*1 28: a28 ----------------------------- [-] 1 list:
*1 29: a29 [-] 1 list:
*1 30: a30 ------------------------------- [-] 1 list:
*1 31: a31 [R] 1 tuple:
*1 30: a30 ------------------------------- [-] 1 list:
*1 31: a31 [R] 1 tuple:
*1 Reference Pattern by <[dict of] class>. 0: _ --- [-] 1 list:
*0 1: a [-] 1 list:
*1 2: aa ---- [-] 1 list:
*1 3: a3 [-] 1 list:
*1 4: a4 ------ [-] 1 list:
*1 5: a5 [-] 1 list:
*1 6: a6 -------- [-] 1 list:
*1 7: a7 [-] 1 list:
*1 8: a8 ---------- [-] 1 list:
*1 9: a9 [-] 1 list:
*1 <22 more lines. Type e.g. '_.more' for more.> 10: a10 ----------- [-] 1 list:
*1 11: a11 [-] 1 list:
*1 12: a12 ------------- [-] 1 list:
*1 13: a13 [-] 1 list:
*1 14: a14 --------------- [-] 1 list:
*1 15: a15 [-] 1 list:
*1 16: a16 ----------------- [-] 1 list:
*1 17: a17 [-] 1 list:
*1 18: a18 ------------------- [-] 1 list:
*1 19: a19 [-] 1 list:
*1 <12 more lines. Type e.g. '_.more' for more.> Reference Pattern by <[dict of] class>. 0: _ --- [-] 1 list:
*0 1: a [-] 1 list:
*1 2: aa ---- [-] 1 list:
*1 3: a3 [-] 1 list:
*1 4: a4 ------ [-] 1 list:
*1 5: a5 [-] 1 list:
*1 6: a6 -------- [-] 1 list:
*1 7: a7 [-] 1 list:
*1 8: a8 ---------- [-] 1 list:
*1 9: a9 [-] 1 list:
*1 10: a10 ----------- [+] 1 list:
*1 Reference Pattern by <[dict of] class>. 0: _ --- [-] 1 list:
*0 1: a [-] 1 list:
*1 2: aa ---- [-] 1 list:
*1 3: a3 [-] 1 list:
*1 4: a4 ------ [-] 1 list:
*1 5: a5 [-] 1 list:
*1 6: a6 -------- [-] 1 list:
*1 7: a7 [-] 1 list:
*1 8: a8 ---------- [-] 1 list:
*1 9: a9 [-] 1 list:
*1 10: a10 ----------- [-] 1 list:
*1 11: a11 [-] 1 list:
*1 12: a12 ------------- [-] 1 list:
*1 13: a13 [-] 1 list:
*1 14: a14 --------------- [-] 1 list:
*1 15: a15 [-] 1 list:
*1 16: a16 ----------------- [-] 1 list:
*1 17: a17 [-] 1 list:
*1 18: a18 ------------------- [-] 1 list:
*1 19: a19 [-] 1 list:
*1 10: a10 ----------- [-] 1 list:
*1 11: a11 [-] 1 list:
*1 12: a12 ------------- [-] 1 list:
*1 13: a13 [-] 1 list:
*1 14: a14 --------------- [-] 1 list:
*1 15: a15 [-] 1 list:
*1 16: a16 ----------------- [-] 1 list:
*1 17: a17 [-] 1 list:
*1 18: a18 ------------------- [-] 1 list:
*1 19: a19 [-] 1 list:
*1 20: a20 --------------------- [+] 1 list:
*1 (tStringIORRR RRR2tmoretstrttoptprevRR'tgetvalue( RRtRR4R RR.Rtmtm1tm2((R0RR1sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyttest_presentationsR             ¤c Cs¬ddl}g}|g}|g}|f}|g}||g}|j||ƒ}|j|jj|ƒ|jƒ|j|jj|ƒ|j|jj|d|ƒdS(Niÿÿÿÿi( tgcRR%R(R&tcollecttaaR*trg( RR@R RRBtbtbaRR((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyttest_referrer_registration—s       c Cs•ddl}g}|g}|j|gƒ|j||ddddƒ}|j|jj|ƒ|j|jj|ƒg}dd d„ƒY}|ƒ}||_i|d6}||f}|jƒ|j||ddƒ}d |j j _ |j|jj|ƒ|j|j j|j ƒt|jjjƒ}|j|d kƒ~~|j} d|j j _ ~|jƒt| jjƒ} |j| d kƒdS( NiÿÿÿÿR"i timdomitAcBseZRS((RR (((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyRHÃsR i((R@R RR%R(R&RR RAtert classifiertis_clear_drg_enabledRDt__dict__R$RR*tdict_ownershiptassert_( RR@R RRRHRRDtlnRtlnnow((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyttest_some_more_advanced_usages²s8         (RR R/R?RFRQ(((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyR!Gs  E ÿ tNewCasecBseZd„Zd„ZRS(cCs‰g}|g}|g}||g}|j||ƒ}|j|j|j||ƒƒ|jƒ|jƒ|j|j|j|ƒƒdS(N(RR'RRtpoptreset(RR RRDRR((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyt test_resetæs     c Cség}|gdgd}|g}||g}|j||ƒ}d}|jt|jdƒƒ|ƒ||jdƒ }|jt|jddi|j|ƒd6ƒƒ|ƒ|jt|jdddd|j|ƒgƒƒ|ƒdS(Ni(s¬Paths from source 'a3' to target '_'. 0: a3 [0] @ [0] 1: aa [0] @ [0] 2: a [0] @ [0] 3: _ [0] = <1 list:
*0> 4: aa [0] @ [1] 5: a [1] @ [0] -> #3ta3s 4:tandsetsR(RRR'R7tpathstindexR(RR RRDRRtexpected((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyt test_pathsõs   5(RR RUR[(((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyRRâs icCs$tjt|ƒtjt|ƒdS(N(Rt run_unittestR!RR(tdebug((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyt test_mainscCsddlm}ddl}ddl}ddl}d}|ƒx9d|G|jƒGH|d7}tƒ|jƒ|ƒqDWdS(Niÿÿÿÿ(t xmemstatsis[%d]i(tguppy.heapy.heapycR_R@tsysttimetasctimeR^RA(R_R@RaRbR((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyt test_leaks$  t__main__( tguppy.heapy.testRR5RattypestunittestRR!RRR^RdR(((sO/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/test_RefPat.pyts0Cÿœ2