mò "á¸Ec@svdZdklZd„Zd„Zd„Zd„Zd„Zd„Zdfd „ƒYZ d e fd „ƒYZ d S( sY Revision information: $Id: BaseTestMapping.py 40218 2005-11-18 14:39:19Z andreasjung $ (s __getitem__cCsÛx\|D]T}|i||||ƒ|i|i|dƒ||ƒ|i|i|ƒƒqWxu|D]m}|i|i|dƒdƒ|i|i|ƒdƒ|i|i||ƒ|ƒ|i t t ||ƒqfWdS(N( tstatetkeytselft assertEqualtinsttgettNonet failUnlessthas_keytabsentt assertRaisestKeyErrort __getitem__(RRRR R((tE/data/zmath/zope/lib/python/Interface/Common/tests/BaseTestMapping.pyttestIReadMappings cCsLt|iƒƒ}|iƒt|iƒƒ}|iƒ|i||ƒdS(s*Return the keys of the mapping object N( tlistRtkeyst inst_keystsortRt state_keysRR(RRRRR((R t test_keys$scCsLt|iƒƒ}|iƒt|iƒƒ}|iƒ|i||ƒdS(s,Return the values of the mapping object N( RRtvaluest inst_valuesRRt state_valuesRR(RRRRR((R t test_values+scCsLt|iƒƒ}|iƒt|iƒƒ}|iƒ|i||ƒdS(s+Return the items of the mapping object N( RRtitemst inst_itemsRRt state_itemsRR(RRRRR((R t test_items2scCs |it|ƒt|ƒƒdS(sReturn the number of items N(RRtlenRR(RRR((R t test___len__9scCsDt|||ƒt|||ƒt|||ƒt|||ƒdS(N(RRRRRRR(RRR((R ttestIEnumerableMapping>stBaseTestIReadMappingcBstZd„ZRS(NcCs;|iƒ}|iƒ}|iƒ}t||||ƒdS(N(Rt_IReadMapping__sampleRt_IReadMapping__stateDictRt_IReadMapping__absentKeysR R(RR RR((R RFs   (t__name__t __module__R(((R R DstBaseTestIEnumerableMappingcBsMtZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS(s2Mapping objects whose items can be enumerated cCs,|iƒ}|iƒ}t|||ƒdS(s.Return the keys of the mapping object N(Rt_IEnumerableMapping__sampleRt_IEnumerableMapping__stateDictRR(RRR((R RUs  cCs,|iƒ}|iƒ}t|||ƒdS(s0Return the values of the mapping object N(RR'RR(RR(RRR((R R\s  cCs,|iƒ}|iƒ}t|||ƒdS(s/Return the items of the mapping object N(RR'RR(RR(RRR((R Rcs  cCs,|iƒ}|iƒ}t|||ƒdS(s#Return the number of items N(RR'RR(RR(RRR((R Rjs  cCs |iƒS(N(RR((R((R R"qscCs |iƒS(N(RR'(R((R R!tscCs |iƒS(N(Rt_IEnumerableMapping__absentKeys(R((R R#ws( R$R%t__doc__RRRRR"R!R#(((R R&Qs       N( R*toperatorR RRRRRRR R&( R RRR R&RRRR((R t?s