3 Ø ÷^üVã@sNddlZddlZddlZGdd„dejƒZGdd„deƒZGdd„deƒZdS)éNc@s eZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd„Zd d!„Zd"d#„Zd$d%„ZdS)&ÚBasicTestMappingProtocolNcCs ddddœS)NÚ2Zvalue1ééé)Ú1Zkey1Zkey2)rrr©)Úselfrrú*/usr/lib64/python3.6/test/mapping_tests.pyÚ _referencesz#BasicTestMappingProtocol._referencecCs|jƒS)N)Ú type2test)r rrr Ú_empty_mappingsz'BasicTestMappingProtocol._empty_mappingcCs*|jƒ}x|jƒD]\}}|||<qW|S)N)r Úitems)r ÚdataÚxÚkeyÚvaluerrr Ú _full_mappings z&BasicTestMappingProtocol._full_mappingcOs`tjj|f|ž|Ž|jƒjƒ|_|jjƒ\}}||i|_|jjƒ\}}||i|_||j|<dS)N) ÚunittestÚTestCaseÚ__init__r ÚcopyÚ referenceÚpopitemÚotherÚ inmapping)r ÚargsÚkwrrrrr rs  z!BasicTestMappingProtocol.__init__csˆjƒ}t|ƒ}ˆjˆjƒ‰ˆ|kr(|}x&ˆjjƒD]\}}ˆjˆ||ƒq4Wtˆjjƒƒd‰ˆj t ‡‡fdd„ƒˆjt |ƒdƒˆjt ˆƒt ˆjƒƒxˆjD]}ˆj |ˆƒq¦WxˆjD]}ˆj |ˆƒqÂWˆj||ƒˆjˆˆƒˆj|ˆƒˆjˆ|ƒ|rˆjdƒˆs&ˆjdƒ‡fdd„}|tˆjƒƒtˆjƒƒˆjjƒƒ|tˆƒtˆjƒƒˆjjƒƒ|tˆjƒƒtˆjƒƒˆjjƒƒ|tˆjƒƒtˆjƒƒˆjjƒƒttˆjƒƒƒ\}}ttˆjjƒƒƒ\‰}ˆjˆj||ƒ|ƒˆjˆjˆ|ƒ|ƒˆj ˆˆƒdS)NrcsˆˆS)Nrr)ÚdÚknownkeyrr Ú6sz4BasicTestMappingProtocol.test_read..z#Empty mapping must compare to Falsez!Full mapping must compare to TruecsVˆjt|dƒƒˆjt|dƒƒt|ƒ}ˆjt|ƒt|ƒkoJt|ƒknƒdS)NÚ__next__Ú__iter__)Ú assertTrueÚhasattrÚlistÚset)ÚiterZlstÚrefr)r rr Úcheck_iterandlistHsz=BasicTestMappingProtocol.test_read..check_iterandlist)r ÚdictrrrÚ assertEqualr%rÚkeysÚ assertRaisesÚKeyErrorÚlenÚassertInÚ assertNotInZassertNotEqualÚfailr'ÚvaluesÚnextÚget)r ÚpZp1rrÚkr)Ú knownvaluer)rrr r Ú test_read+sH             z"BasicTestMappingProtocol.test_readcsî|jƒ‰x.|jjƒD] \‰}|ˆˆ<|jˆˆ|ƒqWx.|jjƒD] ‰ˆˆ=|jt‡‡fdd„ƒqDW|jƒ‰ˆj|jƒ|jtˆƒ|jƒt ˆjƒƒ}|jƒ‰ˆj|ƒ|jtˆƒ|jƒ|j |jƒ}t t |jƒƒƒ\‰}t t |j jƒƒƒ\}}|j|jˆ|ƒ|ƒ|j|ˆ|ƒ|j|j||ƒ|ƒ|j|||ƒ|j|j|ƒ|ƒ|j||ƒ|jt|j|ƒd}|||<|j|j||ƒ|ƒ|j||ƒ|j|j||ƒ|ƒ|jƒ\‰}|jˆ|ƒ|j||jˆƒ|jƒ‰|jtˆjƒdS)NcsˆˆS)Nrr)rr6rr r dsz5BasicTestMappingProtocol.test_write..i)r rrr+r,r-r.Úupdater*r%rr4r'rÚ setdefaultÚpopr1r)r rrrrr8Údefaultr)rr6r Ú test_write[sD        z#BasicTestMappingProtocol.test_writecCs|j|jƒ|jƒƒdS)N)r+r )r rrr Útest_constructor…sz)BasicTestMappingProtocol.test_constructorcCsJ|j|jƒ ƒ|j|jƒ|jt|jƒƒdkƒ|jt|jƒdkƒdS)NFT)r#r rÚbool)r rrr Ú test_boolˆs z"BasicTestMappingProtocol.test_boolcCsr|jƒ}|jt|jƒƒgƒ|j}|jt|jjƒƒd|jƒƒ|jt|jjƒƒd|jƒƒ|j t |jdƒdS)Nr) r r+r%r,rr0rr1rr-Ú TypeError)r rrrr Ú test_keysŽs z"BasicTestMappingProtocol.test_keyscCs0|jƒ}|jt|jƒƒgƒ|jt|jdƒdS)N)r r+r%r3r-rB)r rrrr Ú test_values–sz$BasicTestMappingProtocol.test_valuescCs0|jƒ}|jt|jƒƒgƒ|jt|jdƒdS)N)r r+r%rr-rB)r rrrr Ú test_itemsœsz#BasicTestMappingProtocol.test_itemscCs|jƒ}|jt|ƒdƒdS)Nr)r r+r/)r rrrr Útest_len¢sz!BasicTestMappingProtocol.test_lencCsD|j}|j|t|jjƒƒdt|jjƒƒdƒ|jt|jƒdS)Nr) rr+r%rr,r3r-rBÚ __getitem__)r rrrr Ú test_getitem¦sz%BasicTestMappingProtocol.test_getitemcsò|jƒ}|j|jƒ|jt|jƒƒt|jjƒƒƒ|jƒ}|jƒ|j||jƒƒ|jƒ}|j|jjƒƒ|jt|jƒƒt|jjƒƒƒ|jƒ}|j|jjƒƒ|jt|jƒƒt|jjƒƒƒ|jttf|jdƒ|‰G‡fdd„dƒ}|j ƒ|j|ƒƒt |jƒƒ}t |j jƒƒ}|j||ƒGdd„dt ƒ‰|jƒ}G‡fdd„dƒ}|jˆ|j|ƒƒ|j ƒG‡fdd„dƒ}|jˆ|j|ƒƒG‡fd d„dƒ}|jˆ|j|ƒƒ|jƒ}G‡fd d „d t ƒ}|jˆ|j|ƒƒ|jt|jdgƒdS)Né*cs(eZdZ‡fdd„Zdd„Zdd„ZdS)z.SimpleUserDictcs ˆj|_dS)N)rr)r )Ú outerselfrr rÈszEBasicTestMappingProtocol.test_update..SimpleUserDict.__init__cSs |jjƒS)N)rr,)r rrr r,ÊszABasicTestMappingProtocol.test_update..SimpleUserDict.keyscSs |j|S)N)r)r Úirrr rGÌszHBasicTestMappingProtocol.test_update..SimpleUserDict.__getitem__N)Ú__name__Ú __module__Ú __qualname__rr,rGr)rJrr ÚSimpleUserDictÇs rOc@s eZdZdS)z1BasicTestMappingProtocol.test_update..ExcN)rLrMrNrrrr ÚExcÔsrPcseZdZ‡fdd„ZdS)z=BasicTestMappingProtocol.test_update..FailingUserDictcsˆ‚dS)Nr)r )rPrr r,ØszBBasicTestMappingProtocol.test_update..FailingUserDict.keysN)rLrMrNr,r)rPrr ÚFailingUserDict×srQcs eZdZ‡fdd„Zdd„ZdS)z=BasicTestMappingProtocol.test_update..FailingUserDictcsG‡fdd„dƒ}|ƒS)Ncs(eZdZdd„Zdd„Z‡fdd„ZdS)zUBasicTestMappingProtocol.test_update..FailingUserDict.keys..BogonItercSs d|_dS)Nr)rK)r rrr rász^BasicTestMappingProtocol.test_update..FailingUserDict.keys..BogonIter.__init__cSs|S)Nr)r rrr r"ãsz^BasicTestMappingProtocol.test_update..FailingUserDict.keys..BogonIter.__iter__cs|jrd|_dSˆ‚dS)NrÚa)rK)r )rPrr r!åsz^BasicTestMappingProtocol.test_update..FailingUserDict.keys..BogonIter.__next__N)rLrMrNrr"r!r)rPrr Ú BogonIteràsrSr)r rS)rPrr r,ßs zBBasicTestMappingProtocol.test_update..FailingUserDict.keyscSs|S)Nr)r rrrr rGëszIBasicTestMappingProtocol.test_update..FailingUserDict.__getitem__N)rLrMrNr,rGr)rPrr rQÞs cs eZdZdd„Z‡fdd„ZdS)z=BasicTestMappingProtocol.test_update..FailingUserDictcSsGdd„dƒ}|ƒS)Nc@s$eZdZdd„Zdd„Zdd„ZdS)zUBasicTestMappingProtocol.test_update..FailingUserDict.keys..BogonItercSstdƒ|_dS)NrR)ÚordrK)r rrr ròsz^BasicTestMappingProtocol.test_update..FailingUserDict.keys..BogonIter.__init__cSs|S)Nr)r rrr r"ôsz^BasicTestMappingProtocol.test_update..FailingUserDict.keys..BogonIter.__iter__cSs2|jtdƒkr*t|jƒ}|jd7_|St‚dS)NÚzr)rKrTÚchrÚ StopIteration)r Zrtnrrr r!ös  z^BasicTestMappingProtocol.test_update..FailingUserDict.keys..BogonIter.__next__N)rLrMrNrr"r!rrrr rSñsrSr)r rSrrr r,ðs zBBasicTestMappingProtocol.test_update..FailingUserDict.keyscsˆ‚dS)Nr)r r)rPrr rGýszIBasicTestMappingProtocol.test_update..FailingUserDict.__getitem__N)rLrMrNr,rGr)rPrr rQïs cs eZdZdd„Z‡fdd„ZdS)z4BasicTestMappingProtocol.test_update..badseqcSs|S)Nr)r rrr r"sz=BasicTestMappingProtocol.test_update..badseq.__iter__cs ˆƒ‚dS)Nr)r )rPrr r!sz=BasicTestMappingProtocol.test_update..badseq.__next__N)rLrMrNr"r!r)rPrr ÚbadseqsrXrrr)rrr)r r:rr+r%rr-rBÚAttributeErrorÚclearÚsortedrÚ ExceptionÚobjectÚ ValueError)r rrOZi1Zi2rQrXr)rPrJr Ú test_update­sB    z$BasicTestMappingProtocol.test_updatecCs|jƒ}|j|jt|jjƒƒdƒdkƒ|j|jt|jjƒƒddƒdƒ|j}|j|jt|jjƒƒdƒdkƒ|j|jt|jjƒƒddƒdƒ|j|jt|jjƒƒdƒt|jj ƒƒdƒ|j|jt|jjƒƒddƒt|jj ƒƒdƒ|j t |jƒ|j t |jdddƒdS)Nrr) r r#r5r%rr,r+rrr3r-rB)r rrrr Útest_gets""""z!BasicTestMappingProtocol.test_getcCs|jƒ}|jt|jƒdS)N)r r-rBr;)r rrrr Útest_setdefaultsz(BasicTestMappingProtocol.test_setdefaultcCs*|jƒ}|jt|jƒ|jt|jdƒdS)NrI)r r-r.rrB)r rrrr Ú test_popitem sz%BasicTestMappingProtocol.test_popitemcCsz|jƒ}t|jjƒƒd\}}|||<|jt|jt|jjƒƒdƒ|j |j|ƒ|ƒ|j t |ƒdƒ|jt|j|ƒdS)Nr) r r%rrr-r.r<rr,r+r/)r rr7Úvrrr Útest_pop%sz!BasicTestMappingProtocol.test_pop)rLrMrNr r r rrr9r>r?rArCrDrErFrHr_r`rarbrdrrrr rs& 0*arc@sŒeZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd „Zd!S)"ÚTestMappingProtocolcCs@tj|ƒ|j|jƒ|jƒk ƒ|j|jddddddœƒdS)Nrr)rÚy)rr?r#r r+r )r rrr r?2s z$TestMappingProtocol.test_constructorcCsdtj|ƒ|j|jƒ ƒ|j|jddiƒƒ|jt|jƒƒdkƒ|jt|jddiƒƒdkƒdS)NrrfFT)rrAr#r rr@)r rrr rA7s  zTestMappingProtocol.test_boolcCsftj|ƒ|jƒ}|jt|jƒƒgƒ|jdddœƒ}|jƒ}|jd|ƒ|jd|ƒ|jd|ƒdS)Nrr)rRÚbrRrgÚc) rrCr r+r%r,rr0r1)r rr7rrr rC>s   zTestMappingProtocol.test_keyscCs2tj|ƒ|jddiƒ}|jt|jƒƒdgƒdS)Nrr)rrDrr+r%r3)r rrrr rDHs zTestMappingProtocol.test_valuescCs2tj|ƒ|jddiƒ}|jt|jƒƒdgƒdS)Nrr)rr)rrErr+r%r)r rrrr rEMs zTestMappingProtocol.test_itemscCsv|jƒ}|jd|ƒ|jd|kƒ|jd|kƒ|jdddœƒ}|jd|ƒ|jd|ƒ|jd|ƒ|jt|jƒdS)NrRrr)rRrgrgrh)r r1r#rr0r-rBÚ __contains__)r rrrr Ú test_containsSs    z!TestMappingProtocol.test_containscCs.tj|ƒ|jdddœƒ}|jt|ƒdƒdS)Nrr)rRrg)rrFrr+r/)r rrrr rF_s zTestMappingProtocol.test_lencCs”tj|ƒ|jdddœƒ}|j|ddƒ|j|ddƒd|d<d|d<|j|ddƒ|j|ddƒ|d=|j|ddd œƒ|jt|jƒdS) Nrr)rRrgrRrgrrhé)rRrh)rrHrr+r-rBrG)r rrrr rHds z TestMappingProtocol.test_getitemcCs:|jddddœƒ}|jƒ|j|iƒ|jt|jdƒdS)Nrrr)rrr)rrZr+r-rB)r rrrr Ú test_clearrs zTestMappingProtocol.test_clearcCs†tj|ƒ|jƒ}|jddiƒ|jddiƒ|jddddœƒ|j|ddddœƒ|jƒ|j|ddddœƒ|jƒ}|jdd|jdd|jdddd |j|dddd œƒ|jƒ}|jddgƒ|j|ddd œƒ|jƒ}|jddgddd |j|ddd œƒ|jdd dœƒ}|j|jdd ddœƒjƒƒ|j|dd d ddœƒGdd„dƒ}|jƒ|j|ƒƒ|j|ddddœƒdS)Nrédrér)rrr)r)rf)rrfrUrrf)rrfrk)rré)rré)rrrrpc@s$eZdZdd„Zdd„Zdd„ZdS)z7TestMappingProtocol.test_update..SimpleUserDictcSsddddœ|_dS)Nrrr)rrr)r)r rrr rsz@TestMappingProtocol.test_update..SimpleUserDict.__init__cSs |jjƒS)N)rr,)r rrr r,Ÿsz.SimpleUserDict.keyscSs |j|S)N)r)r rKrrr rG¡szCTestMappingProtocol.test_update..SimpleUserDict.__getitem__N)rLrMrNrr,rGrrrr rOœsrO)rrm)rfrn)rrm)rfrn)rr_r r:r+rrrZ)r rrOrrr r_ys4    zTestMappingProtocol.test_updatec s |j|jjdƒddddœƒ|jƒ}|j|jdƒ|k ƒ|j|jdƒddddœƒ|j|jddƒdddœƒ|j|jgƒiƒdd„}|j|j|ƒƒd diƒ|jtijd ƒGd d „d |jƒ}|j|jd ƒd diƒ|j|ƒjd ƒd diƒ|j|jd ƒj|kƒ|j|ƒjd ƒj|kƒ|jt|jd ƒƒ|kƒGdd„d|jƒ}|jdƒ}|j|dddœƒ|j |t j ƒ|jtt jƒGdd„dt ƒ‰G‡fdd„d|jƒ}|jˆ|jd gƒG‡fdd„dtƒ}|jˆ|jj|ƒƒG‡fdd„d|jƒ}|jˆ|jd gƒdS)NÚabc)rRrgrhrkrpr)rkrpcss dVdS)Nrrrrrr Úg®sz,TestMappingProtocol.test_fromkeys..grrc@s eZdZdS)z3TestMappingProtocol.test_fromkeys..dictlikeN)rLrMrNrrrr Údictlike²srsrRc@seZdZdd„ZdS)z1TestMappingProtocol.test_fromkeys..mydictcSstjƒS)N)Ú collectionsÚUserDict)Úclsrrr Ú__new__¹sz9TestMappingProtocol.test_fromkeys..mydict.__new__N)rLrMrNrwrrrr Úmydict¸srxÚab)rRrgc@s eZdZdS)z.TestMappingProtocol.test_fromkeys..ExcN)rLrMrNrrrr rPÀsrPcseZdZ‡fdd„ZdS)z3TestMappingProtocol.test_fromkeys..baddict1cs ˆƒ‚dS)Nr)r )rPrr rÃsz.baddict1.__init__N)rLrMrNrr)rPrr Úbaddict1Âsrzcs eZdZdd„Z‡fdd„ZdS)z1TestMappingProtocol.test_fromkeys..BadSeqcSs|S)Nr)r rrr r"Ész:TestMappingProtocol.test_fromkeys..BadSeq.__iter__cs ˆƒ‚dS)Nr)r )rPrr r!Ësz:TestMappingProtocol.test_fromkeys..BadSeq.__next__N)rLrMrNr"r!r)rPrr ÚBadSeqÈsr{cseZdZ‡fdd„ZdS)z3TestMappingProtocol.test_fromkeys..baddict2cs ˆƒ‚dS)Nr)r rr)rPrr Ú __setitem__Ñsz?TestMappingProtocol.test_fromkeys..baddict2.__setitem__N)rLrMrNr|r)rPrr Úbaddict2Ðsr})rkrp)r+r Úfromkeysr r#r-rBÚ __class__ÚtypeÚassertIsInstancertrur*r\r]) r rrrrsrxÚudrzr{r}r)rPr Ú test_fromkeys§s6 z!TestMappingProtocol.test_fromkeyscCsh|jddddœƒ}|j|jƒddddœƒ|jƒ}|j|jƒ|ƒ|j|jƒ|jƒ|jt|jdƒdS)Nrrr)rrr)rr+rr rrr-rB)r rrrr Ú test_copyÖs zTestMappingProtocol.test_copycCsœtj|ƒ|jƒ}|j|jdƒdkƒ|j|jddƒdƒ|jdddœƒ}|j|jdƒdkƒ|j|jddƒdƒ|j|jdƒdƒ|j|jddƒdƒdS)Nrhrrr)rRrgrR)rr`r r#r5r+r)r rrrr r`Þs zTestMappingProtocol.test_getcCs–tj|ƒ|jƒ}|j|jdƒdkƒ|jdgƒ|j|jdƒdkƒ|jdgƒjdƒ|j|dddƒ|jdgƒjdƒ|jt|dƒdƒdS)NZkey0rrrrkr)rrar r#r;Úappendr+r/)r rrrr raés  z#TestMappingProtocol.test_setdefaultc Cs tj|ƒxúdD]ò}xìtdƒD]à}d|}|jƒ}|jƒ}x0t|ƒD]$}||t|ƒ<|dkrF||t|ƒ<qFW|dkr~|jƒ}xht|ƒD]\}|jƒ\}}} |j|t|ƒƒ|jƒ\} } } |j| t| ƒƒ|j |dkoÞ| | k ƒqˆW|j | ƒ|j | ƒq WqWdS)Nré rréÿÿÿÿr)r‡r) rrbÚranger Úreprrrr+Úintr#) r ZcopymodeZlog2sizeÚsizerRrgrKZkaZvaZtaZkbZvbÚtbrrr rbôs(    z TestMappingProtocol.test_popitemcCsNtj|ƒ|jƒ}d\}}|j|j||ƒ|ƒ|||<|j|j|dƒ|ƒdS)NrqÚdefr)rqr)rrdr r+r<)r rr7rcrrr rd s  zTestMappingProtocol.test_popN)rLrMrNr?rArCrDrErjrFrHrlr_rƒr„r`rarbrdrrrr re1s   ./  rec@sLeZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dS)ÚTestHashMappingProtocolcs”tj|ƒGdd„dtƒ‰G‡fdd„dtƒ}|jƒ}d||ƒ<|jt|jdƒG‡fdd„dtƒ}|jƒ}|ƒ}d||<d |_|jˆ|j|ƒdS) Nc@s eZdZdS)z1TestHashMappingProtocol.test_getitem..ExcN)rLrMrNrrrr rPsrPcs eZdZ‡fdd„Zdd„ZdS)z3TestHashMappingProtocol.test_getitem..BadEqcs ˆƒ‚dS)Nr)r r)rPrr Ú__eq__sz:TestHashMappingProtocol.test_getitem..BadEq.__eq__cSsdS)Nér)r rrr Ú__hash__!sz.BadEq.__hash__N)rLrMrNrr‘r)rPrr ÚBadEqs r’rIécseZdZdZ‡fdd„ZdS)z5TestHashMappingProtocol.test_getitem..BadHashFcs|jrˆƒ‚ndSdS)NrI)r2)r )rPrr r‘*sz>TestHashMappingProtocol.test_getitem..BadHash.__hash__N)rLrMrNr2r‘r)rPrr ÚBadHash(sr”T) rerHr\r]r r-r.rGr2)r r’rr”rr)rPr rHs  z$TestHashMappingProtocol.test_getitemcCsJtj|ƒGdd„d|jƒ}|jdƒ}|j|dddœƒ|j|tjƒdS)Nc@seZdZdd„ZdS)z5TestHashMappingProtocol.test_fromkeys..mydictcSstjƒS)N)rtru)rvrrr rw9sz=TestHashMappingProtocol.test_fromkeys..mydict.__new__N)rLrMrNrwrrrr rx8srxry)rRrg)rerƒr r~r+rrtru)r rxr‚rrr rƒ6s   z%TestHashMappingProtocol.test_fromkeyscs^tj|ƒGdd„dtƒ‰G‡fdd„dtƒ}|jƒ}|ƒ}d||<d|_|jˆ|j|ƒdS)Nc@s eZdZdS)z-TestHashMappingProtocol.test_pop..ExcN)rLrMrNrrrr rPBsrPcseZdZdZ‡fdd„ZdS)z1TestHashMappingProtocol.test_pop..BadHashFcs|jrˆƒ‚ndSdS)NrI)r2)r )rPrr r‘Fsz:TestHashMappingProtocol.test_pop..BadHash.__hash__N)rLrMrNr2r‘r)rPrr r”Dsr”rIT)rerdr\r]r r2r-r<)r r”rrr)rPr rd?s z TestHashMappingProtocol.test_popc CsR|jƒ}d|d<yx|D]}d||d<qWWntk rBYn X|jdƒdS)Nrz7changing dict size during iteration doesn't raise Error)r Ú RuntimeErrorr2)r rrKrrr Útest_mutatingiterationRs z.TestHashMappingProtocol.test_mutatingiterationcs–|jƒ}|jt|ƒdƒd|d<|jt|ƒdƒ|jƒ}||d<|jt|ƒdƒGdd„dtƒ‰G‡fdd „d tƒ}|jd|ƒiƒ}|jˆt|ƒdS) Nz{}rrz{1: 2}z {1: {...}}c@s eZdZdS)z.TestHashMappingProtocol.test_repr..ExcN)rLrMrNrrrr rPfsrPcseZdZ‡fdd„ZdS)z2TestHashMappingProtocol.test_repr..BadReprcs ˆƒ‚dS)Nr)r )rPrr Ú__repr__isz;TestHashMappingProtocol.test_repr..BadRepr.__repr__N)rLrMrNr—r)rPrr ÚBadReprhsr˜)r r+r‰r\r]rr-)r rr˜r)rPr Ú test_repr]sz!TestHashMappingProtocol.test_reprcCsH|jƒ}x,ttjƒdƒD]}|}|jƒ}||d<qW|jtt|ƒdS)Nrmr)r rˆÚsysÚgetrecursionlimitr-ÚRecursionErrorr‰)r rrKZd0rrr Útest_repr_deepos  z&TestHashMappingProtocol.test_repr_deepcs¤|j|jƒ|jƒƒ|j|jddiƒ|jddiƒƒGdd„dtƒ‰G‡fdd„dtƒ‰|jˆƒdiƒ‰|jddiƒ‰|jˆ‡fdd„ƒ|jˆ‡‡fd d„ƒdS) Nrrc@s eZdZdS)z,TestHashMappingProtocol.test_eq..ExcN)rLrMrNrrrr rP|srPcs eZdZ‡fdd„Zdd„ZdS)z/TestHashMappingProtocol.test_eq..BadCmpcs ˆƒ‚dS)Nr)r r)rPrr rsz6TestHashMappingProtocol.test_eq..BadCmp.__eq__cSsdS)Nrr)r rrr r‘sz8TestHashMappingProtocol.test_eq..BadCmp.__hash__N)rLrMrNrr‘r)rPrr ÚBadCmp~s ržcs ˆƒdkS)Nrrr)ržrr r †sz1TestHashMappingProtocol.test_eq..csˆˆkS)Nrr)Úd1Úd2rr r ‡s)r+r rr\r]r-)r r)ržrPrŸr r Útest_eqwszTestHashMappingProtocol.test_eqcs`tj|ƒGdd„dtƒ‰G‡fdd„dtƒ}|jƒ}|ƒ}d||<d|_|jˆ|j|gƒdS)Nc@s eZdZdS)z4TestHashMappingProtocol.test_setdefault..ExcN)rLrMrNrrrr rPŒsrPcseZdZdZ‡fdd„ZdS)z8TestHashMappingProtocol.test_setdefault..BadHashFcs|jrˆƒ‚ndSdS)NrI)r2)r )rPrr r‘szATestHashMappingProtocol.test_setdefault..BadHash.__hash__N)rLrMrNr2r‘r)rPrr r”Žsr”rIT)rerar\r]r r2r-r;)r r”rrr)rPr ra‰s z'TestHashMappingProtocol.test_setdefaultN) rLrMrNrHrƒrdr–r™rr¡rarrrr rŽs  rŽ)rrtršrrrerŽrrrr Ús,h