ó {G_Tc@s‹dZddlZddlZddlZddlZddlmZdejfd„ƒYZd„Z d„Z e dkr‡e ƒndS( sUnit tests for the copy module.iÿÿÿÿN(t test_supporttTestCopycBsZeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d „Z"d!„Z#d"„Z$d#„Z%d$„Z&d%„Z'd&„Z(d'„Z)d(„Z*d)„Z+d*„Z,d+„Z-d,„Z.d-„Z/d.„Z0d/„Z1d0„Z2d1„Z3d2„Z4d3„Z5d4„Z6d5„Z7d6„Z8d7„Z9d8„Z:d9„Z;d:„Z<d;„Z=d<„Z>d=„Z?d>„Z@d?„ZAd@„ZBdA„ZCRS(BcCs6|jtjtjkƒ|jttjtƒƒdS(N(t assertTruetcopytErrorterrort issubclasst Exception(tself((s*/usr/local/lib/python2.7/test/test_copy.pyttest_exceptionsscCs)d}tj|ƒ}|j||ƒdS(Ni*(Rt assertEqual(Rtxty((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_basicscsgdtf‡fd†ƒY‰ˆdƒ}tj|ƒ}|j|j|jƒ|j|j|jƒdS(NtCcs eZd„Z‡fd†ZRS(cSs ||_dS(N(tfoo(RR((s*/usr/local/lib/python2.7/test/test_copy.pyt__init__scs ˆ|jƒS(N(R(R(R(s*/usr/local/lib/python2.7/test/test_copy.pyt__copy__s(t__name__t __module__RR((R(s*/usr/local/lib/python2.7/test/test_copy.pyRs i*(tobjectRR t __class__R(RR R ((Rs*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_copys  csmdtfd„ƒY‰‡fd†}ˆdƒ}|jttj|ƒtjˆ|ˆƒtj|ƒ}dS(NRcBseZd„ZRS(cSstj|ƒ}||_|S(N(Rt__new__R(tclsRtobj((s*/usr/local/lib/python2.7/test/test_copy.pyR&s (RRR(((s*/usr/local/lib/python2.7/test/test_copy.pyR%scsˆ|jffS(N(R(R(R(s*/usr/local/lib/python2.7/test/test_copy.pytpickle_C*si*(Rt assertRaisest TypeErrorRtcopy_regtpickle(RRR R ((Rs*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_registry$s  cCsEdtfd„ƒY}|ƒ}tj|ƒ}|j||kƒdS(NRcBseZd„Zd„ZRS(cSsdS(Nt((Rtproto((s*/usr/local/lib/python2.7/test/test_copy.pyt __reduce_ex__3scSstjd‚dS(Nsshouldn't call this(Rt TestFailed(R((s*/usr/local/lib/python2.7/test/test_copy.pyt __reduce__5s(RRR"R$(((s*/usr/local/lib/python2.7/test/test_copy.pyR2s (RRR(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_reduce_ex1s cCsEdtfd„ƒY}|ƒ}tj|ƒ}|j||kƒdS(NRcBseZd„ZRS(cSsdS(NR ((R((s*/usr/local/lib/python2.7/test/test_copy.pyR$=s(RRR$(((s*/usr/local/lib/python2.7/test/test_copy.pyR<s(RRR(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_reduce;s cCs<dtfd„ƒY}|ƒ}|jtjtj|ƒdS(NRcBseZd„ZRS(cSs+|jdƒrt|‚ntj||ƒS(Nt__reduce(t startswithtAttributeErrorRt__getattribute__(Rtname((s*/usr/local/lib/python2.7/test/test_copy.pyR*Es (RRR*(((s*/usr/local/lib/python2.7/test/test_copy.pyRDs(RRRR(RRR ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_cantCs cCs¥ddd„ƒY}dtfd„ƒY}d„}dddd ttd d d |j|td ƒ|tg}x3|D]+}|jtj|ƒ|kt |ƒƒqrWdS(NtClassiccBseZRS((RR(((s*/usr/local/lib/python2.7/test/test_copy.pyR-OstNewStylecBseZRS((RR(((s*/usr/local/lib/python2.7/test/test_copy.pyR.QscSsdS(N((((s*/usr/local/lib/python2.7/test/test_copy.pytfSsi*lidg…ëQ¸ @yð?thellouhelloሴi (l( RtNonetTruetFalset func_codetxrangetmaxRRtrepr(RR-R.R/ttestsR ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_atomicNs   cCs,dddg}|jtj|ƒ|ƒdS(Niii(R R(RR ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_list[scCs#d}|jtj|ƒ|ƒdS(Niii(iii(R R(RR ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_tuple_scCs1idd6dd6}|jtj|ƒ|ƒdS(NiRitbar(R R(RR ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_dictcscCs<ddd„ƒY}|dƒ}|jtj|ƒ|ƒdS(NRcBseZd„Zd„ZRS(cSs ||_dS(N(R(RR((s*/usr/local/lib/python2.7/test/test_copy.pyRiscSst|j|jƒS(N(tcmpR(Rtother((s*/usr/local/lib/python2.7/test/test_copy.pyt__cmp__ks(RRRR@(((s*/usr/local/lib/python2.7/test/test_copy.pyRhs i*((R R(RRR ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_inst_vanillags csBdd‡fd†ƒY‰ˆdƒ}|jtj|ƒ|ƒdS(NRcs)eZd„Z‡fd†Zd„ZRS(cSs ||_dS(N(R(RR((s*/usr/local/lib/python2.7/test/test_copy.pyRrscs ˆ|jƒS(N(R(R(R(s*/usr/local/lib/python2.7/test/test_copy.pyRtscSst|j|jƒS(N(R>R(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@vs(RRRRR@((R(s*/usr/local/lib/python2.7/test/test_copy.pyRqs i*((R R(RR ((Rs*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_inst_copyps cCs<ddd„ƒY}|dƒ}|jtj|ƒ|ƒdS(NRcBs#eZd„Zd„Zd„ZRS(cSs ||_dS(N(R(RR((s*/usr/local/lib/python2.7/test/test_copy.pyR}scSs |jfS(N(R(R((s*/usr/local/lib/python2.7/test/test_copy.pyt__getinitargs__scSst|j|jƒS(N(R>R(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@s(RRRRCR@(((s*/usr/local/lib/python2.7/test/test_copy.pyR|s  i*((R R(RRR ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_inst_getinitargs{s cCs<ddd„ƒY}|dƒ}|jtj|ƒ|ƒdS(NRcBs#eZd„Zd„Zd„ZRS(cSs ||_dS(N(R(RR((s*/usr/local/lib/python2.7/test/test_copy.pyRˆscSsi|jd6S(NR(R(R((s*/usr/local/lib/python2.7/test/test_copy.pyt __getstate__ŠscSst|j|jƒS(N(R>R(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@Œs(RRRRER@(((s*/usr/local/lib/python2.7/test/test_copy.pyR‡s  i*((R R(RRR ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_inst_getstate†s cCs<ddd„ƒY}|dƒ}|jtj|ƒ|ƒdS(NRcBs#eZd„Zd„Zd„ZRS(cSs ||_dS(N(R(RR((s*/usr/local/lib/python2.7/test/test_copy.pyR“scSs|d|_dS(NR(R(Rtstate((s*/usr/local/lib/python2.7/test/test_copy.pyt __setstate__•scSst|j|jƒS(N(R>R(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@—s(RRRRHR@(((s*/usr/local/lib/python2.7/test/test_copy.pyR’s  i*((R R(RRR ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_inst_setstate‘s cCs<ddd„ƒY}|dƒ}|jtj|ƒ|ƒdS(NRcBs,eZd„Zd„Zd„Zd„ZRS(cSs ||_dS(N(R(RR((s*/usr/local/lib/python2.7/test/test_copy.pyRžscSs|jS(N(R(R((s*/usr/local/lib/python2.7/test/test_copy.pyRE scSs ||_dS(N(R(RRG((s*/usr/local/lib/python2.7/test/test_copy.pyRH¢scSst|j|jƒS(N(R>R(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@¤s(RRRRERHR@(((s*/usr/local/lib/python2.7/test/test_copy.pyRs   i*((R R(RRR ((s*/usr/local/lib/python2.7/test/test_copy.pyt test_copy_inst_getstate_setstateœs cCs)d}tj|ƒ}|j||ƒdS(Ni*(RtdeepcopyR (RR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_basic«scCs~g}||g}tj|ƒ}|j||ƒ|j||k ƒ|j|d|dk ƒ|j|d|dkƒdS(Nii(RRKR R(RR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_memo°s csLdtfd„ƒY‰dd‡fd†ƒY}|jtj|ƒ|ƒdS(NtMetacBseZRS((RR(((s*/usr/local/lib/python2.7/test/test_copy.pyRNÀsRcseZˆZRS((RRt __metaclass__((RN(s*/usr/local/lib/python2.7/test/test_copy.pyRÂs((ttypeR RRK(RR((RNs*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_issubclass»scsgdtf‡fd†ƒY‰ˆdƒ}tj|ƒ}|j|j|jƒ|j|j|jƒdS(NRcs#eZd„Zd‡fd†ZRS(cSs ||_dS(N(R(RR((s*/usr/local/lib/python2.7/test/test_copy.pyRÈscs ˆ|jƒS(N(R(Rtmemo(R(s*/usr/local/lib/python2.7/test/test_copy.pyt __deepcopy__ÊsN(RRRR1RS((R(s*/usr/local/lib/python2.7/test/test_copy.pyRÇs i*(RRRKR RR(RR R ((Rs*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_deepcopyÆs  csmdtfd„ƒY‰‡fd†}ˆdƒ}|jttj|ƒtjˆ|ˆƒtj|ƒ}dS(NRcBseZd„ZRS(cSstj|ƒ}||_|S(N(RRR(RRR((s*/usr/local/lib/python2.7/test/test_copy.pyRÓs (RRR(((s*/usr/local/lib/python2.7/test/test_copy.pyRÒscsˆ|jffS(N(R(R(R(s*/usr/local/lib/python2.7/test/test_copy.pyR×si*(RRRRRKRR(RRR R ((Rs*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_registryÑs  cCsEdtfd„ƒY}|ƒ}tj|ƒ}|j||kƒdS(NRcBseZd„Zd„ZRS(cSsdS(NR ((RR!((s*/usr/local/lib/python2.7/test/test_copy.pyR"àscSstjd‚dS(Nsshouldn't call this(RR#(R((s*/usr/local/lib/python2.7/test/test_copy.pyR$âs(RRR"R$(((s*/usr/local/lib/python2.7/test/test_copy.pyRßs (RRRKR(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_reduce_exÞs cCsEdtfd„ƒY}|ƒ}tj|ƒ}|j||kƒdS(NRcBseZd„ZRS(cSsdS(NR ((R((s*/usr/local/lib/python2.7/test/test_copy.pyR$ês(RRR$(((s*/usr/local/lib/python2.7/test/test_copy.pyRés(RRRKR(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_reduceès cCs<dtfd„ƒY}|ƒ}|jtjtj|ƒdS(NRcBseZd„ZRS(cSs+|jdƒrt|‚ntj||ƒS(NR'(R(R)RR*(RR+((s*/usr/local/lib/python2.7/test/test_copy.pyR*òs (RRR*(((s*/usr/local/lib/python2.7/test/test_copy.pyRñs(RRRRRK(RRR ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_cantðs cCs¥ddd„ƒY}dtfd„ƒY}d„}dddd ttd d d |j|td ƒ|tg}x3|D]+}|jtj |ƒ|kt |ƒƒqrWdS(NR-cBseZRS((RR(((s*/usr/local/lib/python2.7/test/test_copy.pyR-üsR.cBseZRS((RR(((s*/usr/local/lib/python2.7/test/test_copy.pyR.þscSsdS(N((((s*/usr/local/lib/python2.7/test/test_copy.pyR/si*lidg…ëQ¸ @yð?R0uhelloሴi (l( RR1R2R3R4R5R6RRRKR7(RR-R.R/R8R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_atomicûs   cCscddgdg}tj|ƒ}|j||ƒ|j||k ƒ|j|d|dk ƒdS(Niiii(RRKR R(RR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_lists cCs|g}|j|ƒtj|ƒ}|jtt||ƒ|j||k ƒ|j|d|kƒ|jt|ƒdƒdS(Nii( tappendRRKRt RuntimeErrorR>RR tlen(RR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_reflexive_lists cCscddgdf}tj|ƒ}|j||ƒ|j||k ƒ|j|d|dk ƒdS(Niiii(RRKR R(RR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_tuples cCsŒgf}|dj|ƒtj|ƒ}|jtt||ƒ|j||k ƒ|j|d|dk ƒ|j|dd|kƒdS(Ni(R[RRKRR\R>R(RR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_reflexive_tuples cCskiddgd6dd6}tj|ƒ}|j||ƒ|j||k ƒ|j|d|dk ƒdS(NiiRiR<(RRKR R(RR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_dict(s cCsyi}||dRR R](RR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_reflexive_dict/s cCs?i}d}tj||ƒ}|j|t|ƒ|kƒdS(Ni*(RRKRtid(RRRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_keepalive8scCs^ddd„ƒY}|dgƒ}tj|ƒ}|j||ƒ|j|j|jk ƒdS(NRcBseZd„Zd„ZRS(cSs ||_dS(N(R(RR((s*/usr/local/lib/python2.7/test/test_copy.pyR@scSst|j|jƒS(N(R>R(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@Bs(RRRR@(((s*/usr/local/lib/python2.7/test/test_copy.pyR?s i*((RRKR RR(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_inst_vanilla>s cswdd‡fd†ƒY‰ˆdgƒ}tj|ƒ}|j||ƒ|j||k ƒ|j|j|jk ƒdS(NRcs)eZd„Z‡fd†Zd„ZRS(cSs ||_dS(N(R(RR((s*/usr/local/lib/python2.7/test/test_copy.pyRKscsˆtj|j|ƒƒS(N(RRKR(RRR(R(s*/usr/local/lib/python2.7/test/test_copy.pyRSMscSst|j|jƒS(N(R>R(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@Os(RRRRSR@((R(s*/usr/local/lib/python2.7/test/test_copy.pyRJs i*((RRKR RR(RR R ((Rs*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_inst_deepcopyIs cCsqddd„ƒY}|dgƒ}tj|ƒ}|j||ƒ|j||k ƒ|j|j|jk ƒdS(NRcBs#eZd„Zd„Zd„ZRS(cSs ||_dS(N(R(RR((s*/usr/local/lib/python2.7/test/test_copy.pyRYscSs |jfS(N(R(R((s*/usr/local/lib/python2.7/test/test_copy.pyRC[scSst|j|jƒS(N(R>R(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@]s(RRRRCR@(((s*/usr/local/lib/python2.7/test/test_copy.pyRXs  i*((RRKR RR(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_inst_getinitargsWs cCsqddd„ƒY}|dgƒ}tj|ƒ}|j||ƒ|j||k ƒ|j|j|jk ƒdS(NRcBs#eZd„Zd„Zd„ZRS(cSs ||_dS(N(R(RR((s*/usr/local/lib/python2.7/test/test_copy.pyRgscSsi|jd6S(NR(R(R((s*/usr/local/lib/python2.7/test/test_copy.pyREiscSst|j|jƒS(N(R>R(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@ks(RRRRER@(((s*/usr/local/lib/python2.7/test/test_copy.pyRfs  i*((RRKR RR(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_inst_getstatees cCsqddd„ƒY}|dgƒ}tj|ƒ}|j||ƒ|j||k ƒ|j|j|jk ƒdS(NRcBs#eZd„Zd„Zd„ZRS(cSs ||_dS(N(R(RR((s*/usr/local/lib/python2.7/test/test_copy.pyRuscSs|d|_dS(NR(R(RRG((s*/usr/local/lib/python2.7/test/test_copy.pyRHwscSst|j|jƒS(N(R>R(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@ys(RRRRHR@(((s*/usr/local/lib/python2.7/test/test_copy.pyRts  i*((RRKR RR(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_inst_setstatess cCsqddd„ƒY}|dgƒ}tj|ƒ}|j||ƒ|j||k ƒ|j|j|jk ƒdS(NRcBs,eZd„Zd„Zd„Zd„ZRS(cSs ||_dS(N(R(RR((s*/usr/local/lib/python2.7/test/test_copy.pyRƒscSs|jS(N(R(R((s*/usr/local/lib/python2.7/test/test_copy.pyRE…scSs ||_dS(N(R(RRG((s*/usr/local/lib/python2.7/test/test_copy.pyRH‡scSst|j|jƒS(N(R>R(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@‰s(RRRRERHR@(((s*/usr/local/lib/python2.7/test/test_copy.pyR‚s   i*((RRKR RR(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyt$test_deepcopy_inst_getstate_setstates  cCsaddd„ƒY}|ƒ}||_tj|ƒ}|j||k ƒ|j|j|kƒdS(NRcBseZRS((RR(((s*/usr/local/lib/python2.7/test/test_copy.pyR’s((RRRKR(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_reflexive_inst‘s   cCsgdtfd„ƒY}|ƒ}tj|ƒ}|j||kƒtj|ƒ}|j||kƒdS(NRcBseZd„ZRS(cSsdS(NR ((R((s*/usr/local/lib/python2.7/test/test_copy.pyR$žs(RRR$(((s*/usr/local/lib/python2.7/test/test_copy.pyRs(RRRRK(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_reconstruct_stringœs  cs‚dtf‡fd†ƒY‰ˆƒ}d|_tj|ƒ}|j|j|jkƒtj|ƒ}|j|j|jkƒdS(NRcseZ‡fd†ZRS(cs ˆdfS(N(((R(R(s*/usr/local/lib/python2.7/test/test_copy.pyR$¨s(RRR$((R(s*/usr/local/lib/python2.7/test/test_copy.pyR§si*(RRRRRRK(RR R ((Rs*/usr/local/lib/python2.7/test/test_copy.pyttest_reconstruct_nostate¦s  csŒdtf‡fd†ƒY‰ˆƒ}dg|_tj|ƒ}|j||ƒtj|ƒ}|j||ƒ|j|j|jk ƒdS(NRcs&eZ‡fd†Zd„ZdZRS(csˆd|jfS(N((t__dict__(R(R(s*/usr/local/lib/python2.7/test/test_copy.pyR$³scSst|j|jƒS(N(R>Rn(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@µsN(RRR$R@R1t__hash__((R(s*/usr/local/lib/python2.7/test/test_copy.pyR²s i*(RRRR RKR(RR R ((Rs*/usr/local/lib/python2.7/test/test_copy.pyttest_reconstruct_state±s  csŒdtf‡fd†ƒY‰ˆƒ}dg|_tj|ƒ}|j||ƒtj|ƒ}|j||ƒ|j|j|jk ƒdS(NRcs/eZ‡fd†Zd„Zd„ZdZRS(csˆd|jfS(N((Rn(R(R(s*/usr/local/lib/python2.7/test/test_copy.pyR$ÂscSs|jj|ƒdS(N(Rntupdate(RRG((s*/usr/local/lib/python2.7/test/test_copy.pyRHÄscSst|j|jƒS(N(R>Rn(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@ÆsN(RRR$RHR@R1Ro((R(s*/usr/local/lib/python2.7/test/test_copy.pyRÁs  i*(RRRR RKR(RR R ((Rs*/usr/local/lib/python2.7/test/test_copy.pyttest_reconstruct_state_setstateÀs  cCsddtfd„ƒY}|ƒ}||_tj|ƒ}|j||k ƒ|j|j|kƒdS(NRcBseZRS((RR(((s*/usr/local/lib/python2.7/test/test_copy.pyRÒs(RRRRKR(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_reconstruct_reflexiveÑs   csÒdtf‡fd†ƒY‰ˆddgdgƒ}tj|ƒ}|j||ƒ|j||k ƒ|j|d|dkƒtj|ƒ}|j||ƒ|j||k ƒ|j|d|dk ƒdS(NRcs&eZ‡fd†Zd„ZdZRS(csˆd|jt|ƒfS(N((Rntiter(R(R(s*/usr/local/lib/python2.7/test/test_copy.pyR$ÞscSs.tt|ƒt|ƒƒp-t|j|jƒS(N(R>tlistRn(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@àsN(RRR$R@R1Ro((R(s*/usr/local/lib/python2.7/test/test_copy.pyRÝs iiii(RuRR RRK(RR R ((Rs*/usr/local/lib/python2.7/test/test_copy.pyttest_reduce_4tupleÜscsØdtf‡fd†ƒY‰ˆdddgfdgƒ}tj|ƒ}|j||ƒ|j||k ƒ|j|d|dkƒtj|ƒ}|j||ƒ|j||k ƒ|j|d|dk ƒdS( NRcs&eZ‡fd†Zd„ZdZRS(csˆd|jd|jƒfS(N((RnR1t iteritems(R(R(s*/usr/local/lib/python2.7/test/test_copy.pyR$ðscSs.tt|ƒttƒƒp-t|j|jƒS(N(R>tdictRuRn(RR?((s*/usr/local/lib/python2.7/test/test_copy.pyR@òsN(RRR$R@R1Ro((R(s*/usr/local/lib/python2.7/test/test_copy.pyRïs RiiR<i(sbari(RxRR RRK(RR R ((Rs*/usr/local/lib/python2.7/test/test_copy.pyttest_reduce_5tupleîscCsWdtfd„ƒY}|ƒ}dg|_tj|ƒ}|j|j|jkƒdS(NRcBseZdgZRS(R(RRt __slots__(((s*/usr/local/lib/python2.7/test/test_copy.pyRsi*(RRRR(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_slotss   cCsmdtfd„ƒY}|ƒ}dg|_tj|ƒ}|j|j|jƒ|j|j|jk ƒdS(NRcBseZdgZRS(R(RRRz(((s*/usr/local/lib/python2.7/test/test_copy.pyR si*(RRRRKR R(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_slotss   cCs¨dtfd„ƒY}|didd6ƒ}tj|ƒ}|j||ƒ|j|j|jƒ|j||k ƒd|d<|j||ƒ|j|j|jƒdS(NRcBseZdd„Zd„ZRS(cSs8|si}nt|jƒƒ|_tj||ƒdS(N(Rutkeyst_keysRxR(Rtd((s*/usr/local/lib/python2.7/test/test_copy.pyRs cSs9tj|||ƒ||jkr5|jj|ƒndS(N(Rxt __setitem__R~R[(Rtkeytitem((s*/usr/local/lib/python2.7/test/test_copy.pyR€sN(RRR1RR€(((s*/usr/local/lib/python2.7/test/test_copy.pyRs RiRiR<(RxRRKR R~RtassertNotEqual(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_dict_subclasss  cCs¶dtfd„ƒY}|ddgdgƒ}ddg|_tj|ƒ}|jt|ƒt|ƒƒ|j|j|jƒ|j|d|dkƒ|j|j|jkƒdS( NRcBseZRS((RR(((s*/usr/local/lib/python2.7/test/test_copy.pyR&siiiiii(RuRRR R(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_list_subclass%scCs¶dtfd„ƒY}|ddgdgƒ}ddg|_tj|ƒ}|jt|ƒt|ƒƒ|j|j|jƒ|j|d|dk ƒ|j|j|jk ƒdS( NRcBseZRS((RR(((s*/usr/local/lib/python2.7/test/test_copy.pyR1siiiiii(RuRRRKR R(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_list_subclass0scCsjdtfd„ƒY}|dddgƒ}|jt|ƒdƒtj|ƒ}|jt|ƒdƒdS(NRcBseZRS((RR(((s*/usr/local/lib/python2.7/test/test_copy.pyR<siii(iii(iii(ttupleR R(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_tuple_subclass;s cCs³dtfd„ƒY}|ddgdgƒ}|jt|ƒddgdfƒtj|ƒ}|jt|ƒddgdfƒ|j||k ƒ|j|d|dk ƒdS(NRcBseZRS((RR(((s*/usr/local/lib/python2.7/test/test_copy.pyRDsiiii(R‡R RRKR(RRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_tuple_subclassCs""cCs3dtfd„ƒY}|jttj|ƒƒdS(Nt EvilStatecBseZd„ZRS(cSs td‚dS(Nsain't got no stickin' state(t ValueError(R((s*/usr/local/lib/python2.7/test/test_copy.pyREOs(RRRE(((s*/usr/local/lib/python2.7/test/test_copy.pyRŠNs(RRR‹R(RRŠ((s*/usr/local/lib/python2.7/test/test_copy.pyttest_getstate_excMscCsa|jtjtƒtƒd„}|jtj|ƒ|ƒd„}|jtj|ƒ|ƒdS(NcSs||S(N((R R ((s*/usr/local/lib/python2.7/test/test_copy.pyRUscSsdS(N(R1(((s*/usr/local/lib/python2.7/test/test_copy.pytWs(R Rt global_foo(RRR<((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_functionSs   cCsa|jtjtƒtƒd„}|jtj|ƒ|ƒd„}|jtj|ƒ|ƒdS(NcSs||S(N((R R ((s*/usr/local/lib/python2.7/test/test_copy.pyR\scSsdS(N(R1(((s*/usr/local/lib/python2.7/test/test_copy.pyR^s(R RRKRŽ(RRR<((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_functionZs   cCssdtfd„ƒY}|ƒ}tj|ƒ}||ƒ}|j||kƒ~||ƒ}|j||kƒdS(NRcBseZRS((RR(((s*/usr/local/lib/python2.7/test/test_copy.pyRbs(RtweakreftrefR(Rt_copyRRR R ((s*/usr/local/lib/python2.7/test/test_copy.pyt_check_weakrefas   cCs|jtjƒdS(N(R”R(R((s*/usr/local/lib/python2.7/test/test_copy.pyttest_copy_weakreflscCs|jtjƒdS(N(R”RRK(R((s*/usr/local/lib/python2.7/test/test_copy.pyttest_deepcopy_weakrefosc Csdtfd„ƒY}gtdƒD]}|ƒ^q#\}}}}|ƒ}|||<|||s    ÿÿº