ó {G_Tc@s‚ddlmZddlZddlZddlZddlZdejfd„ƒYZdejfd„ƒYZdejfd„ƒYZ d ejfd „ƒYZ d ejfd „ƒYZ d ejfd„ƒYZ dejfd„ƒYZ dZejdkr dndZejdkr%dndZejeejkdƒdejfd„ƒYƒZd„Zedkr~eƒndS(iÿÿÿÿ(t test_supportNt IntTestCasecBs#eZd„Zd„Zd„ZRS(cCsÁtj}x¡|r¬xŠ| |fD]{}tj|ƒ}tj|ƒ}|j||ƒtj|ttj dƒƒtj ttj dƒƒ}|j||ƒq W|d?}q Wt j tj ƒdS(Ntwbtrbi( tsystmaxinttmarshaltdumpstloadst assertEqualtdumptfileRtTESTFNtloadtostunlink(tselftntexpectedtstgot((s-/usr/local/lib/python2.7/test/test_marshal.pyt test_ints s  cCsŸd„}d }| d}x~||| |d? fD]d}x[|r–d||dƒ}tj|ƒ}|j||ƒ|dkr‰d}q<|dL}q<Wq3WdS( NcSsKg}x5t|ƒD]'}|jt|d@ƒƒ|dL}qWdj|ƒS(Niÿit(trangetappendtchrtjoin(tvaluetnbytestbytesti((s-/usr/local/lib/python2.7/test/test_marshal.pytto_little_endian_strings li?itIiiÿÿÿÿillÿÿÿÿ(RRR (RRtmaxint64tminint64tbaseRR((s-/usr/local/lib/python2.7/test/test_marshal.pyt test_int64s     cCsÂx»ttfD]­}tjtj|ƒƒ}|j||ƒ|jt|ƒt|ƒƒtj|tt j dƒƒtj tt j dƒƒ}|j||ƒ|jt|ƒt|ƒƒq WdS(NRR( tTruetFalseRRRR ttypeR R RR R (Rtbtnew((s-/usr/local/lib/python2.7/test/test_marshal.pyt test_bool0s(t__name__t __module__RR$R*(((s-/usr/local/lib/python2.7/test/test_marshal.pyR s  t FloatTestCasecBseZd„ZRS(cCsƒd}tjd}x³||krÈx–| |fD]‡}t|ƒ}tj|ƒ}tj|ƒ}|j||ƒtj|tt j dƒƒtj tt j dƒƒ}|j||ƒq0W|d:}qWd}tj|dƒ}tj|ƒ}|j||ƒtj|dƒ}tj|ƒ}|j||ƒtjd }x.||krnx| |fD]}t|ƒ}tj|ƒ}tj|ƒ}|j||ƒtj|dƒ}tj|ƒ}|j||ƒtj|tt j dƒƒtj tt j dƒƒ}|j||ƒtj|tt j dƒdƒtj tt j dƒƒ}|j||ƒq[W|d9}qAWt j t j ƒdS( NgÙ}ÚõÐò¾:gŸ6˜Ò«ôsRRgS£’:Ý^@giigìZ1% (RRtfloatRRRR R R RR R RR(RtsmallRRtfRR((s-/usr/local/lib/python2.7/test/test_marshal.pyt test_floats;sJ    (R+R,R1(((s-/usr/local/lib/python2.7/test/test_marshal.pyR-:stStringTestCasecBs#eZd„Zd„Zd„ZRS(cCsÜxÅdddddgD]­}tjtj|ƒƒ}|j||ƒ|jt|ƒt|ƒƒtj|ttjdƒƒtj ttjdƒƒ}|j||ƒ|jt|ƒt|ƒƒqWt j tjƒdS(Nuu Andrè Previnuabcu i'RR( RRRR R'R R RR R RR(RRR)((s-/usr/local/lib/python2.7/test/test_marshal.pyt test_unicodeks cCsÜxÅdddddgD]­}tjtj|ƒƒ}|j||ƒ|jt|ƒt|ƒƒtj|ttjdƒƒtj ttjdƒƒ}|j||ƒ|jt|ƒt|ƒƒqWt j tjƒdS(NRs Andrè Previntabct i'RR( RRRR R'R R RR R RR(RRR)((s-/usr/local/lib/python2.7/test/test_marshal.pyt test_stringvs cCsÌxµdddddgD]}tjdtfƒt|ƒ}WdQXtjtj|ƒƒ}|j||ƒtj|t tj dƒƒtj t tj dƒƒ}|j||ƒqWt j tj ƒdS( NRs Andrè PrevinR4R5i'sbuffer.. not supportedRR(Rtcheck_py3k_warningstDeprecationWarningtbufferRRRR R R R R RR(RRR(R)((s-/usr/local/lib/python2.7/test/test_marshal.pyt test_buffers  (R+R,R3R6R:(((s-/usr/local/lib/python2.7/test/test_marshal.pyR2js tExceptionTestCasecBseZd„ZRS(cCs,tjtjtƒƒ}|jt|ƒdS(N(RRRt StopIterationR (RR)((s-/usr/local/lib/python2.7/test/test_marshal.pyttest_exceptionsŽs(R+R,R=(((s-/usr/local/lib/python2.7/test/test_marshal.pyR;st CodeTestCasecBseZd„ZRS(cCs8tjj}tjtj|ƒƒ}|j||ƒdS(N(R;R=t func_codeRRRR (RtcoR)((s-/usr/local/lib/python2.7/test/test_marshal.pyt test_code“s (R+R,RA(((s-/usr/local/lib/python2.7/test/test_marshal.pyR>’stContainerTestCasecBsmeZidd6dd6dd6dd6d gd 6dd 6ed 6dd6Zd„Zd„Zd„Zd„ZRS(sfoo@bar.baz.spamtastringgHázns¼@tafloatiitanintlt ashortlongs.zyx.41talisti tatupletabooleanu Andrè PrevintaunicodecCstjtj|jƒƒ}|j|j|ƒtj|jttjdƒƒtj ttjdƒƒ}|j|j|ƒt j tjƒdS(NRR( RRRtdR R R RR R RR(RR)((s-/usr/local/lib/python2.7/test/test_marshal.pyt test_dict¢s cCs’|jjƒ}tjtj|ƒƒ}|j||ƒtj|ttj dƒƒtj ttj dƒƒ}|j||ƒt j tj ƒdS(NRR( RKtitemsRRRR R R RR R RR(RtlstR)((s-/usr/local/lib/python2.7/test/test_marshal.pyt test_listªscCs˜t|jjƒƒ}tjtj|ƒƒ}|j||ƒtj|tt j dƒƒtj tt j dƒƒ}|j||ƒt j t j ƒdS(NRR(ttupleRKtkeysRRRR R R RR R RR(RttR)((s-/usr/local/lib/python2.7/test/test_marshal.pyt test_tuple³scCsáxÚttfD]Ì}||jjƒƒ}tjtj|ƒƒ}|j||ƒ|jt ||ƒƒ|j t |ƒt |ƒƒtj |t tjdƒƒtjt tjdƒƒ}|j||ƒtjtjƒq WdS(NRR(tsett frozensetRKRQRRRR t assertTruet isinstancetassertNotEqualtidR R RR R RR(Rt constructorRRR)((s-/usr/local/lib/python2.7/test/test_marshal.pyt test_sets¼si(s.zyx.41( s.zyx.41s.zyx.41s.zyx.41s.zyx.41s.zyx.41s.zyx.41s.zyx.41s.zyx.41s.zyx.41s.zyx.41(R+R,R&RKRLRORSR[(((s-/usr/local/lib/python2.7/test/test_marshal.pyRB˜s     t BugsTestCasecBsYeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS( cCstjdgdƒdS(Ni€iè(RR(R((s-/usr/local/lib/python2.7/test/test_marshal.pyttest_bug_5888452ÉscCsS|jttjdƒ|jttjdƒ|jttjtjdƒd ƒdS(Nt0R0liÿÿÿÿ(t assertRaisest ExceptionRRR(R((s-/usr/local/lib/python2.7/test/test_marshal.pyttest_patch_873224ÍscCsN|jtjtjddƒƒdƒ|jtjtjddƒƒdƒdS(Niii(R RRR(R((s-/usr/local/lib/python2.7/test/test_marshal.pyttest_version_argumentÒs%cCsYxRgtdƒD]}t|ƒ^qD]+}ytj|ƒWq&tk rPq&Xq&WdS(Ni(RRRRR`(RRtc((s-/usr/local/lib/python2.7/test/test_marshal.pyt test_fuzz×s , cCs,dddd }|jttj|ƒdS( NRctXit{iitXXXXtXXXXXXXXXXXXXXXXi(R_t ValueErrorRR(RR((s-/usr/local/lib/python2.7/test/test_marshal.pyttest_loads_recursionàscCsñg}}d}x2t|dƒD] }|jdgƒ|d}q!Wtj|ƒ}tj|ƒ}|jt|ƒt|ƒƒ|jt|dƒt|dƒƒ|jt|dƒt|dƒƒ|jdgƒ|jttj|ƒdS(NiÐiiiÿÿÿÿ( RRRRRR tlenR_Ri(RtheadtlasttMAX_MARSHAL_STACK_DEPTHRtdatatnew_head((s-/usr/local/lib/python2.7/test/test_marshal.pyttest_recursion_limitäs $$c Cs^xWtttttttttf D]4}t d|fiƒ}|j t t j |ƒƒq"WdS(Ntsubtyp(tinttlongR.tcomplexRPtlisttdictRTRUR'R_RiRR(RttypRr((s-/usr/local/lib/python2.7/test/test_marshal.pyttest_exact_type_matchøs(cCs'tdƒ}d|}tj|ƒdS(Ng€„.AR4(RsRR(Rtsizet testString((s-/usr/local/lib/python2.7/test/test_marshal.pyttest_large_marshals  cCs d}|jttj|ƒdS(Ns l(R_RiRR(Rtinvalid_string((s-/usr/local/lib/python2.7/test/test_marshal.pyttest_invalid_longs s( R+R,R]RaRbRdRjRqRyR|R~(((s-/usr/local/lib/python2.7/test/test_marshal.pyR\Ès      iiiÿÿiIÿÿÿÿis!test cannot run on 32-bit systemstLargeValuesTestCasecBsPeZd„Zejdedddeƒd„ƒZejdededdeƒd„ƒZ ejdede deƒd„ƒZ ejdede deƒd „ƒZ ejdede d e jedƒdeƒd „ƒZejdede d e jedƒdeƒd „ƒZejdedddeƒd „ƒZRS(c CsRttjdƒ}|jtjtjƒ||jttj||ƒWdQXdS(NR( topenRR t addCleanupRR_RiRR (RRoR0((s-/usr/local/lib/python2.7/test/test_marshal.pytcheck_unmarshallablesRztmemuseitdry_runcCs|jd|ƒdS(Ntx(R‚(RRz((s-/usr/local/lib/python2.7/test/test_marshal.pyR6sicCs|jd|ƒdS(Nux(R‚(RRz((s-/usr/local/lib/python2.7/test/test_marshal.pyR3scCs|jd|ƒdS(N(N(R‚tNone(RRz((s-/usr/local/lib/python2.7/test/test_marshal.pyRS$scCs|jdg|ƒdS(N(R‚R†(RRz((s-/usr/local/lib/python2.7/test/test_marshal.pyRO)si cCs|jtt|ƒƒƒdS(N(R‚RTR(RRz((s-/usr/local/lib/python2.7/test/test_marshal.pyttest_set.scCs|jtt|ƒƒƒdS(N(R‚RUR(RRz((s-/usr/local/lib/python2.7/test/test_marshal.pyttest_frozenset4scCs|jt|ƒƒdS(N(R‚t bytearray(RRz((s-/usr/local/lib/python2.7/test/test_marshal.pyttest_bytearray:s(R+R,R‚Rtprecisionbigmemtestt LARGE_SIZER&R6tcharacter_sizeR3t pointer_sizeRSRORt getsizeofR‡RˆRŠ(((s-/usr/local/lib/python2.7/test/test_marshal.pyRs 'c Cs&tjtttttttt ƒdS(N( Rt run_unittestRR-R2R>RBR;R\R(((s-/usr/local/lib/python2.7/test/test_marshal.pyt test_main?s t__main__I€(ttestRRRtunittestRtTestCaseRR-R2R;R>RBR\RŒt maxunicodeRtmaxsizeRŽtskipIfRR‘R+(((s-/usr/local/lib/python2.7/test/test_marshal.pyts&    10#0G+