kWc@sddlZddlZddlZddlZddlmZddlmZmZm Z ddlm Z ddl Z ddl Z ddl Z ddlmZmZddlZddlZddlZddlmZmZmZddlmZmZmZddlmZmZdd lmZmZdd lmZmZej d d e!Z"ed dZ#dZ$dej%fdYZ&dej%fdYZ'de'fdYZ(defdYZ)de'fdYZ*dej%fdYZ+dej%fdYZ,de j-fdYZ.d e fd!YZ/d"e j-fd#YZ0ddlZe1d$Z2e3d%kre2d&e!ndS('iN(t test_support(t namedtupletCountert OrderedDict(t mapping_tests(t randrangetshuffle(tHashabletIterabletIterator(tSizedt ContainertCallable(tSett MutableSet(tMappingtMutableMapping(tSequencetMutableSequencetsetst deprecatedtTestNTsx y zsccopy_reg _reconstructor p0 (ctest.test_collections TestNT p1 c__builtin__ tuple p2 (I10 I20 I30 tp3 tp4 Rp5 ccollections OrderedDict p6 ((lp7 (lp8 S'x' p9 aI10 aa(lp10 S'y' p11 aI20 aa(lp12 S'z' p13 aI30 aatp14 Rp15 b. tTestNamedTuplecBseZdZejejjdkddZdZ dZ dZ dZ dZ d Zd Zd ZRS( cCstdd}|j|jd|j|jd|j|jt|j|jtj|j|jd|jt tdd|jt tdd|jt tdd|jt td d |jt td d |jt td d |jt td d |jt td dtddtddtdd}|j dt |jtdd}|j dt |j|jt |j dg|jt |j dddgdS(NtPointsx ytxtysabc%sefg ghitclasst9abctabcsefg g%his abc classs 8efg 9ghis_efg ghis efg efg ghitPoint0sx1 y2t_sa b ctntuthe quick brown foxsu'utheuquicki ii!((RR(utheuquick(Rt assertEqualt__name__t __slots__t __module__t __getitem__ttuplet_fieldst assertRaisest ValueErrort assertNotIntreprt TypeErrort_make(tselfRR((s+/usr/lib/python2.7/test/test_collections.pyt test_factory=s,  is)Docstrings are omitted with -O2 and abovecCs&tdd}|j|jddS(NRsx ys Point(x, y)(RR t__doc__(R-R((s+/usr/lib/python2.7/test/test_collections.pyttest_factory_doc_attrZsc CssxlddgddgddgddgddgddggD].\}}|jtd|dtj|q=WdS(Ntefgsg%hit_1RRt8efgt9ghit_0t_efgtghit_2tRtNTtrename(R1sg%hi(R1R2(sabcsclass(sabcR2(R3R4(R5R2(sabcR6(sabcR2(sabcR1R1R7(sabcR1R8R7(sabcR9R(sabcR2R(R RtTrueR&(R-tspectrenamed((s+/usr/lib/python2.7/test/test_collections.pyttest_name_fixer`s     cCstdd}|dd}|j||dddd|j||ddd|j||dddd|j||d|j||tdddd|jt|d|jt|ddd |jttd t|jttd t|jt|d |jd t ||j||j ddg|j|j d|j|j ddd|j|j tdddd|jt||j y|j ddddWntk rnX|jdtdd}|dddd}|jt|d tdd}|dddd}|jt|d dS(NRsx yi iRRiiisPoint(XXX=1, y=2)s Point(x=1)sPoint(x=11, y=22)t __weakref__terrors%Did not detect an incorrect fieldnamesx, y(i i(RR(ii(RR(RR tdictR'R+tevaltlocalsR*R)tdirR,R&t_replacet_asdicttvarsR(t_fail(R-Rtp((s+/usr/lib/python2.7/test/test_collections.pyt test_instanceks:%%  cCs5tdd}|dd}|j|t|j|d |jt|d |jt|ddg|jt|d|jt|d|\}}|j|||f|j|d|dfd |jt|jd|j|j ||j|j ||jt t dt dS( NRsx yi iiiisp.z(i i(i i(i i(RtassertIsInstanceR%R tlisttmaxR't IndexErrorR$RRtAttributeErrorRCRD(R-RRJRR((s+/usr/lib/python2.7/test/test_collections.pyttest_tuplenesss c s tdd}|j|d|j|jgd|jt|d|j|ji|j|jdtdd}|j|dd|j|jdgd|j|djd|jt|dd|j|djidd6|j|djddd|j|djdd }d dld dl t t fd t |D}t |}td |}|t |}|j|tt ||j|jt |tt |x3t|D]%\}}|jt|||q!Wt||j} tt|t |} |j| | |jt|ddf|d dfg} t |} d| dstBigii*((((i(i(i(RT(RR R,R*RGR&RTRFR]R\RMtsetRVtlenR%t enumeratetgetattrRBtzip( R-RRRStntnamesR^tbtpostnameRTt d_expectedtb2t b2_expected((R\R]s+/usr/lib/python2.7/test/test_collections.pyttest_odd_sizessF#" +  /   cCstdddddd}x~ttfD]p}t|d}t|d}xId D]A}||||}|j|||j|j|jqSWq(WdS(NRi Ritzitloadstdumpsiiii(iiii(RtpickletcPickleRbR R&(R-RJtmoduleRnRotprotocoltq((s+/usr/lib/python2.7/test/test_collections.pyt test_pickles cCsntdddddd}xLtjtjfD]8}||}|j|||j|j|jq.WdS(NRi RiRmi(RtcopytdeepcopyR R&(R-RJtcopierRt((s+/usr/lib/python2.7/test/test_collections.pyt test_copys  c Cstdd}|ddddd}|j|d|jdd d d d d dddd}|j|dtj}tdddt}WdQXttjd|j }|tt j 8}td|}t t t|}||}|j|||tt|j|}|j|||j|}|j||t||j|jtt|j||j|}t d|D}|jtt|j|}|j|||j|jt ||j|j|dS(NtTs"itemgetter property self cls tupleiiiiit itemgetteri tpropertyiR-itclsi(R%i2Rtverboses [A-Za-z]+css|]}|dVqdS(i N((RYtv((s+/usr/lib/python2.7/test/test_collections.pys s(iiiii(i iii(i2(RR RFRtcaptured_stdoutR<R_tretfindalltgetvaluetkeywordtkwlistR%RVR`RBRcR&R,R*RGt__getnewargs__(R-Rztttnewtttemplatetwordstvaluest newvalues((s+/usr/lib/python2.7/test/test_collections.pyttest_name_conflictss2*  (!cCs&tjt}|j|jddS(Ni (RpRntpy273_named_tuple_pickleR R(R-tpt((s+/usr/lib/python2.7/test/test_collections.pyttest_pickling_bug_18015s(R!R#R.tunittesttskipIftsystflagstoptimizeR0R?RKRQRlRuRyRR(((s+/usr/lib/python2.7/test/test_collections.pyR;s  %  '  &t ABCTestCasecBs#eZdZdZdZRS(cGstj|d}td|f|}|xI|D]A}|j}||=td|f|}|jt||q8WdS(NcWsdS(Ni((tstargs((s+/usr/lib/python2.7/test/test_collections.pyt stC(RBtfromkeysttypeRvR'R+(R-RRet methodstubsRRhtstubs((s+/usr/lib/python2.7/test/test_collections.pytvalidate_abstract_methodss  cCsd}tdtfi||6}|j|||jt||dddY}t||||j|||jt||tdtfidd6}|j|||jt||dddY}|j|||jt||dS(NcWsdS(Ni((RR((s+/usr/lib/python2.7/test/test_collections.pyRsRcBseZRS((R!R#(((s+/usr/lib/python2.7/test/test_collections.pyRst__hash__cBseZRS((R!R#(((s+/usr/lib/python2.7/test/test_collections.pyR(s((( RtobjectRLt assertTruet issubclasstsetattrtNonetassertNotIsInstancet assertFalse(R-RRhtstubR((s+/usr/lib/python2.7/test/test_collections.pytvalidate_isinstances c Csddddddddd g }i}x/|D]'}d |d }tt|||sstIcseZfdZRS(cst|jS(N(Rt__iter__(R-(R(s+/usr/lib/python2.7/test/test_collections.pyRzs(R!R#R((R(s+/usr/lib/python2.7/test/test_collections.pyRysR(RRRRRRR*RR%RMR_RRBtkeysRRRLRR RR(R-RRR((Rs+/usr/lib/python2.7/test/test_collections.pyt test_Iterablehs" /$  /c Csdddddjdddgitg }xI|D]A}|j|t|jtt|ttt|q7Wt t t t t t t t t tt tt t jt t jt t jddgDg }xI|D]A}|j|t|jtt|ttt|qW|jtdd d dd Y}|j|td tfd Y}|j|tdS(Ni*gQ @y?R9tasciicss dVdS(N((((s+/usr/lib/python2.7/test/test_collections.pyRscss|] }|VqdS(N((RYR((s+/usr/lib/python2.7/test/test_collections.pys stnextRtNextOnlycBseZdZRS(cssdVtdS(Ni(t StopIteration(R-((s+/usr/lib/python2.7/test/test_collections.pyt__next__s(R!R#R(((s+/usr/lib/python2.7/test/test_collections.pyRst NextOnlyNewcBseZdZRS(cssdVtdS(Ni(R(R-((s+/usr/lib/python2.7/test/test_collections.pyRs(R!R#R(((s+/usr/lib/python2.7/test/test_collections.pyRs(((RtencodeR_RR RRRR*titerRR%RMRBRRRRRLRRR(R-RRRRR((s+/usr/lib/python2.7/test/test_collections.pyt test_Iterators(! / $$  /c Cs2ddddddgDg}xI|D]A}|j|t|jtt|ttt|q/Wttt t t t t j t jt jg }xI|D]A}|j|t|jtt|ttt|qW|jtd|jtddS(Ni*gQ @y?css dVdS(N((((s+/usr/lib/python2.7/test/test_collections.pyRscss|] }|VqdS(N((RYR((s+/usr/lib/python2.7/test/test_collections.pys st__len__(RRR RRRR*RR%RMR_RRBRRRRLRRR(R-RRR((s+/usr/lib/python2.7/test/test_collections.pyt test_Sizeds   /* /cCs&ddddddgDg}xI|D]A}|j|t|jtt|ttt|q/Wttt t t t t j t jg}xI|D]A}|j|t|jtt|ttt|qW|jtd|jtddS(Ni*gQ @y?css dVdS(N((((s+/usr/lib/python2.7/test/test_collections.pyRscss|] }|VqdS(N((RYR((s+/usr/lib/python2.7/test/test_collections.pys st __contains__(RRR RRRR*RR%RMR_RRBRRRLRRR(R-RRR((s+/usr/lib/python2.7/test/test_collections.pyttest_Containers   / /c Cs&ddddddjdd gitddgDg }xI|D]A}|j|t|jtt|ttt|qMWdtt t t t j gj g}xI|D]A}|j|t|jtt|ttt|qW|jtd |jtd dS( Ni*gQ @y?R9Rcss dVdS(N((((s+/usr/lib/python2.7/test/test_collections.pyRscss|] }|VqdS(N((RYR((s+/usr/lib/python2.7/test/test_collections.pys scSsdS(N(R(((s+/usr/lib/python2.7/test/test_collections.pyRst__call__((RRR_RR RRRR*RRR`RMtappendRLRRR(R-RRR((s+/usr/lib/python2.7/test/test_collections.pyt test_Callables    /  /cCsixbttttttfD]H}d|fdY}|jt|||jtt |qWdS(NRcBseZRS((R!R#(((s+/usr/lib/python2.7/test/test_collections.pyRs( RRR R R R RRRR(R-tBR((s+/usr/lib/python2.7/test/test_collections.pyttest_direct_subclassingscCsyxrttttttfD]X}dddY}|jt|||j|j ||j t||qWdS(NRcBseZeZdZRS(N(R!R#Rt __metaclass__RR(((s+/usr/lib/python2.7/test/test_collections.pyRs(( RRR R R R RRR!tregisterR(R-RR((s+/usr/lib/python2.7/test/test_collections.pyttest_registrations  ( R!R#RRRRRRRR(((s+/usr/lib/python2.7/test/test_collections.pyRKs       tWithSetcBsAeZddZdZdZdZdZdZRS(cCst||_dS(N(R_tdata(R-tit((s+/usr/lib/python2.7/test/test_collections.pyRscCs t|jS(N(R`R(R-((s+/usr/lib/python2.7/test/test_collections.pyRscCs t|jS(N(RR(R-((s+/usr/lib/python2.7/test/test_collections.pyRscCs ||jkS(N(R(R-titem((s+/usr/lib/python2.7/test/test_collections.pyRscCs|jj|dS(N(Rtadd(R-R((s+/usr/lib/python2.7/test/test_collections.pyRscCs|jj|dS(N(Rtdiscard(R-R((s+/usr/lib/python2.7/test/test_collections.pyRs((R!R#RRRRRR(((s+/usr/lib/python2.7/test/test_collections.pyRs      tTestCollectionABCscBs}eZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d ZRS( cCsx=ttgD]/}|j|t|jt|tq W|jtddddtfdY}|j|dS(NRRRtMySetcBs#eZdZdZdZRS(cSstS(N(R(R-R((s+/usr/lib/python2.7/test/test_collections.pyRscSsdS(Ni((R-((s+/usr/lib/python2.7/test/test_collections.pyR scSs tgS(N(R(R-((s+/usr/lib/python2.7/test/test_collections.pyR s(R!R#RRR(((s+/usr/lib/python2.7/test/test_collections.pyRs  (R_RRLR RRRR(R-tsampleR((s+/usr/lib/python2.7/test/test_collections.pyttest_Sets cCsLdtfdY}||}}|jt|t|kdS(NtOneTwoThreeSetcBs5eZdZdZdZdZdZRS(cSsdddg|_dS(Niii(tcontents(R-((s+/usr/lib/python2.7/test/test_collections.pyRscSs ||jkS(N(R(R-R((s+/usr/lib/python2.7/test/test_collections.pyRscSs t|jS(N(R`R(R-((s+/usr/lib/python2.7/test/test_collections.pyRscSs t|jS(N(RR(R-((s+/usr/lib/python2.7/test/test_collections.pyRscSs |jS(N(t_hash(R-((s+/usr/lib/python2.7/test/test_collections.pyRs(R!R#RRRRR(((s+/usr/lib/python2.7/test/test_collections.pyRs     (R RR(R-RtaRf((s+/usr/lib/python2.7/test/test_collections.pyt test_hash_Sets cCsr|jtt|jttt|jtt|jttt|jtddddddS(NRRRRR( RLR_RRRRRRR(R-((s+/usr/lib/python2.7/test/test_collections.pyttest_MutableSets cCs<td}|tdM}|jt|tddS(Ntabcdtcdeftcd(RR R_(R-R((s+/usr/lib/python2.7/test/test_collections.pyttest_issue_5647's cCsKdtjfdY}|ddddg}|j|jddS(NRcBsSeZdgZddZdZdZdZdZdZ dZ RS( t__scSs(|dkrg}nt||_dS(N(RR_t _MySet__s(R-R((s+/usr/lib/python2.7/test/test_collections.pyR1s  cSs ||jkS(N(R(R-R((s+/usr/lib/python2.7/test/test_collections.pyR5scSs t|jS(N(RR(R-((s+/usr/lib/python2.7/test/test_collections.pyR7scSs t|jS(N(R`R(R-((s+/usr/lib/python2.7/test/test_collections.pyR9scSs#||jk}|jj||S(N(RR(R-Rtresult((s+/usr/lib/python2.7/test/test_collections.pyR;scSs#||jk}|jj||S(N(RR(R-RR((s+/usr/lib/python2.7/test/test_collections.pyR?scSsdtt|S(Ns MySet(%s)(R*RM(R-((s+/usr/lib/python2.7/test/test_collections.pyt__repr__CsN( R!R#R"RRRRRRRR(((s+/usr/lib/python2.7/test/test_collections.pyR/s       ii+ii(t collectionsRR tpop(R-RR((s+/usr/lib/python2.7/test/test_collections.pyttest_issue_4920-scCst}ttd}t|}||8}|j||t|}||N}|j||t|}||M}|j||||O}|j||dS(Ni (RRVR (R-temptytfullR((s+/usr/lib/python2.7/test/test_collections.pyttest_issue8750Hs        cCsdtfdY}dtfdY}|}|}||k||k||k||k||k||k||k||kdS(NtMyComparableSetcBs#eZdZdZdZRS(cSstS(N(R(R-R((s+/usr/lib/python2.7/test/test_collections.pyR[scSsdS(Ni((R-((s+/usr/lib/python2.7/test/test_collections.pyR]scSs tgS(N(R(R-((s+/usr/lib/python2.7/test/test_collections.pyR_s(R!R#RRR(((s+/usr/lib/python2.7/test/test_collections.pyRZs  tMyNonComparableSetcBs5eZdZdZdZdZdZRS(cSstS(N(R(R-R((s+/usr/lib/python2.7/test/test_collections.pyRbscSsdS(Ni((R-((s+/usr/lib/python2.7/test/test_collections.pyRdscSs tgS(N(R(R-((s+/usr/lib/python2.7/test/test_collections.pyRfscSstS(N(tNotImplemented(R-R((s+/usr/lib/python2.7/test/test_collections.pyRhscSstS(N(R(R-R((s+/usr/lib/python2.7/test/test_collections.pyRjs(R!R#RRRRR(((s+/usr/lib/python2.7/test/test_collections.pyRas     (R (R-RRtcstncs((s+/usr/lib/python2.7/test/test_collections.pyttest_issue16373Ws         cCs |jt|t|dS(N(R R_(R-ts1ts2((s+/usr/lib/python2.7/test/test_collections.pyt assertSameSetzsc CsdtfdY}td}td}td}|d}|d}|d}td}td} td} tjd} tjd} tjd} ||@}|j||@||j||@||j||@||j|| @||j| |@||j|| @|||B}|j||B||j||B||j||B||j|| B||j| |B||j|| B|||}||}|j||||j||||j||||j||||j||||j||||j|| ||j|| ||j| |||j| |||j|| ||j|||||A}|j||A||j||A||j||A||j|| A||j| |A||j|| A||j||k|j||k|j||k|j||k|j||k|j||k|j||k|j||k|j||ktj#|| k||k|| kWdQX|j||k|j||k|j||k|j||k|j||k|j||k|j||k|j||k|j||ktj#|| k||k|| kWdQX|j||k|j||k|j||k|j||k|j||k|j||k|j||k|j||k|j||ktj#|| k||k|| kWdQX|j||k|j||k|j||k|j||k|j||k|j||k|j||k|j||k|j||ktj#|| k||k|| kWdQX|j||k|j||k|j||k|j||k|j||k|j||k|| k||k|| k|j||k|j||k|j||k|j||k|j||k|j||k|| k||k|| kdS( NtListSetcBs8eZddZdZdZdZdZRS(cSs@g|_x0|D](}||jkr|jj|qqWdS(N(RR(R-telementstelem((s+/usr/lib/python2.7/test/test_collections.pyRs  cSs ||jkS(N(R(R-R((s+/usr/lib/python2.7/test/test_collections.pyRscSs t|jS(N(RR(R-((s+/usr/lib/python2.7/test/test_collections.pyRscSs t|jS(N(R`R(R-((s+/usr/lib/python2.7/test/test_collections.pyRscSsdj|jS(Ns Set({!r})(tformatR(R-((s+/usr/lib/python2.7/test/test_collections.pyRs((R!R#RRRRR(((s+/usr/lib/python2.7/test/test_collections.pyRs     Rtbcdtabcdetabccbatbcddcbt abcdeedcba( R R_RMRRRRRtcheck_py3k_warnings(R-Rtr1tr2tr3tf1tf2tf3tl1tl2tl3tp1tp2tp3ttargett fwd_targett rev_target((s+/usr/lib/python2.7/test/test_collections.pyt(test_Set_interoperability_with_real_sets~s                               cCsx:tgD]/}|j|t|jt|tq W|jtdddddtjfdY}|j|dS(NRRRR$t MyMappingcBs#eZdZdZdZRS(cSsdS(Ni((R-((s+/usr/lib/python2.7/test/test_collections.pyR&scSs tdS(N(RO(R-RZ((s+/usr/lib/python2.7/test/test_collections.pyR$(scSs tdS(N((R(R-((s+/usr/lib/python2.7/test/test_collections.pyR*s(R!R#RR$R(((s+/usr/lib/python2.7/test/test_collections.pyR1%s  (RBRLRRRRRR(R-RR1((s+/usr/lib/python2.7/test/test_collections.pyt test_MappingscCs`x:tgD]/}|j|t|jt|tq W|jtdddddddS(NRRRR$t __setitem__t __delitem__(RBRLRRRR(R-R((s+/usr/lib/python2.7/test/test_collections.pyttest_MutableMapping.s cCsx@tttgD]/}|j|t|jt|tqW|jttt|jtdt|jtt t|jttt|j tdddddS(Ni RRRR$( R%RMRRLRRRt basestringRVtxrangeR(R-R((s+/usr/lib/python2.7/test/test_collections.pyt test_Sequence5sc Csx=ttgD]/}|j|t|jt|tq Wx:tgD]/}|j|t|jt|tqJW|jtt t|j tddddddddS(NRRRR$R3R4tinsert( R%RRRRRRMRLRR6R(R-R((s+/usr/lib/python2.7/test/test_collections.pyttest_MutableSequence@s(R!R#RRRRR R RRR0R2R5R8R:(((s+/usr/lib/python2.7/test/test_collections.pyRs       #    t TestCountercBsGeZdZdZdZdZdZdZdZRS(cCsxtd}|j|tidd6dd6dd6|j|tdddddd|j|t|j|t|jttt|jttt|jt|d|jt|j d|jt |j dddg|jt |j dddg|jt |dddg|jt |j d d!d"g|j|dd|j|d d t j7|j|jdt|j|jd tWdQX|j|jdt|j|jd t|j|jdd d|j|jd d d |j|tdddddd|jt|d |j|jd#d$d%gx:td D],}|j|j|d&d'd(g| qW|jdjt |jd|dcd7<|dcd8<|d=|d=|dcd8sR?iR@itgcss$|]}|tddfVqdS(iiN(R(RYR((s+/usr/lib/python2.7/test/test_collections.pys sthRZR[cSstd||S(Ni(RN(RR((s+/usr/lib/python2.7/test/test_collections.pyRscSstd||S(Ni(RN(RR((s+/usr/lib/python2.7/test/test_collections.pyRscSstd||S(Ni(RN(RR((s+/usr/lib/python2.7/test/test_collections.pyRscSstdt||S(Ni(RNtmin(RR((s+/usr/lib/python2.7/test/test_collections.pyRscss|]}|dkVqdS(iN((RYR((s+/usr/lib/python2.7/test/test_collections.pys stabcdefidcss$|]}|tddfVqdS(iiN(R(RYR((s+/usr/lib/python2.7/test/test_collections.pys scss$|]}|tddfVqdS(iiN(R(RYR((s+/usr/lib/python2.7/test/test_collections.pys s(RR RBRVRKt__add__t__sub__t__or__t__and__RRR_RR( R-R=RRZRJRtt counteroptnumberopRRtsetoptcounter_resultt set_result((s+/usr/lib/python2.7/test/test_collections.pyttest_multiset_operationss:" !%'cCstddddddddd d d d }|jdd ddddddd ddddd|j|tddddddddd dddd d ddtddddddddd d d d }|jtdd ddddddd ddddd|j|tddddddddd dddd d ddtd}|jd|j|tdddddddd d ddS(NRiRfiR=iRTi R?iRZi(iiiiR@iR[iiiiii2taaabbcdt aaaabbccei(RtsubtractR (R-R=((s+/usr/lib/python2.7/test/test_collections.pyt test_subtracts-4C-:C  ( R!R#RNRSRVRWRYRgRk(((s+/usr/lib/python2.7/test/test_collections.pyR;Ks ?    'tTestOrderedDictcBseZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZRS(c Cs|jttddgdWdQXdddddg}|jttt|j||jttt|j||jtt|j||jttddddgddd d j||jt j tj d j d gtdd d!d"d#g}|j d$d%gdddd|jt|jd&d'd(d)d*d+d,gdS(-NRiRfiR=iRTiR?ii RR-i,i7R@iRZi(Ri(Rfi(Ri(Rfi(R=i(RTi(R?i(Ri(Rfi(R=i (RTi(Ri(Rfi(R=i(RTi,(R?i7(R?i(R@i(Ri(Rfi(R=i(RTi(R?i(R@i(RZi(R'R+RRR RDRBRRMtinspectt getargspect__dict__RR(R-tpairsRT((s+/usr/lib/python2.7/test/test_collections.pyt test_inits((" c Csn|jttjddgdWdQXdddddg}t}|jt||jt|j|t}|jt||jt|j|t}|j||jt |j|t}|jdd d!d"gddd d |jt |j|t}|jd d |jt |jd#gt}|jdi|jt |jdifgt}|jdd ddddd d|jtt |jd$d%d&d'gtd(d)d*d+d,g}|jd-d.gdddd|jt |jd/d0d1d2d3d4d5gdS(6NRiRfiR=iRTiR?ii R-iRtredtblueiiii,i7R@RZ(Ri(Rfi(Ri(Rfi(R=i(RTi(R?i(Ri(Rfi(R=i (RTi(R-i(Rsi(Ri(Rri(R-i(Ri(Rfi(R=i(RTi,(R?i7(R?i(R@i(Ri(Rfi(R=i(RTi(R?i(R@i(RZi( R'R+RRKRRBR RDRRM(R-RptodRT((s+/usr/lib/python2.7/test/test_collections.pyt test_updates:     %  % "cCs-|jtt|jtttdS(N(RLRRRR(R-((s+/usr/lib/python2.7/test/test_collections.pyttest_abc,scCsnddddddg}t|t|}|jt|t||j|jt|d dS(NR=iRfiRiRTiR?iR@ii(R=i(Rfi(Ri(RTi(R?i(R@i(RRR R`RI(R-RpRt((s+/usr/lib/python2.7/test/test_collections.pyt test_clear0s    cCsd dddddg}t|}|d=|jd||jt |d=WdQX|jt|j|d |ddS(NR=iRfiRiRTiR?iR@i(R=i(Rfi(Ri(RTi(R?i(R@i(RR)R'tKeyErrorR RMR(R-RpRt((s+/usr/lib/python2.7/test/test_collections.pyt test_delitem8s  c Csatdddddg}d |ds(R=i(Rfi(Ri(RTi(R?i(R@i(RRtallt __reduce__(R-RpRt((s+/usr/lib/python2.7/test/test_collections.pyttest_yaml_linkages cCsiddddddg}t|}|jt|jdd |_|jt|jddS(NR=iRfiRiRTiR?iR@ii (R=i(Rfi(Ri(RTi(R?i(R@i(RR R`RR(R-RpRt((s+/usr/lib/python2.7/test/test_collections.pyttest_reduce_not_too_fats   cCsmtddddddg}|jt|d |jtt|||jttddS(NR=iRfiRiRTiR?iR@isIOrderedDict([('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)])s OrderedDict()(R=i(Rfi(Ri(RTi(R?i(R@i(RR R*RC(R-Rt((s+/usr/lib/python2.7/test/test_collections.pyt test_reprs cCs3tjd}||d<|jt|ddS(NRRs@OrderedDict([('a', None), ('b', None), ('c', None), ('x', ...)])(RRR R*(R-Rt((s+/usr/lib/python2.7/test/test_collections.pyttest_repr_recursives cCsddddddg}t|t|}t|j}|j|jdd d|jt|j||j|jdd d |jt|jdddtfdY}|j|jd dddS(NR=iRfiRiRTiR?iR@ii RiRcBseZdZRS(cSsdS(Ni((R-R((s+/usr/lib/python2.7/test/test_collections.pyRs(R!R#R(((s+/usr/lib/python2.7/test/test_collections.pyRsi (R=i(Rfi(Ri(RTi(R?i(R@i(Ri (RRRMRR RL(R-RpRtt pair_orderR((s+/usr/lib/python2.7/test/test_collections.pyttest_setdefaults   cCsTt}d|ds@$ $   %EP