ó {G_Tc@sŽddlZddlZddlZddlZddlmZdjd dƒZdejfd„ƒYZ d „Z e d krŠe ƒndS( iÿÿÿÿN(t test_supports aDate 2004-10-26T10:33:33Z aDict aFalseValue aTrueValue aUnicodeValue Mässig, Maß anotherString <hello & 'hi' there!> deeperDict a 17 b 32.5 c 1 2 text aFloat 0.5 aList A B 12 32.5 1 2 3 aString Doodah anInt 728 nestedData PGxvdHMgb2YgYmluYXJ5IGd1bms+AAECAzxsb3RzIG9mIGJpbmFyeSBndW5r PgABAgM8bG90cyBvZiBiaW5hcnkgZ3Vuaz4AAQIDPGxvdHMgb2YgYmluYXJ5 IGd1bms+AAECAzxsb3RzIG9mIGJpbmFyeSBndW5rPgABAgM8bG90cyBvZiBi aW5hcnkgZ3Vuaz4AAQIDPGxvdHMgb2YgYmluYXJ5IGd1bms+AAECAzxsb3Rz IG9mIGJpbmFyeSBndW5rPgABAgM8bG90cyBvZiBiaW5hcnkgZ3Vuaz4AAQID PGxvdHMgb2YgYmluYXJ5IGd1bms+AAECAw== someData PGJpbmFyeSBndW5rPg== someMoreData PGxvdHMgb2YgYmluYXJ5IGd1bms+AAECAzxsb3RzIG9mIGJpbmFyeSBndW5rPgABAgM8 bG90cyBvZiBiaW5hcnkgZ3Vuaz4AAQIDPGxvdHMgb2YgYmluYXJ5IGd1bms+AAECAzxs b3RzIG9mIGJpbmFyeSBndW5rPgABAgM8bG90cyBvZiBiaW5hcnkgZ3Vuaz4AAQIDPGxv dHMgb2YgYmluYXJ5IGd1bms+AAECAzxsb3RzIG9mIGJpbmFyeSBndW5rPgABAgM8bG90 cyBvZiBiaW5hcnkgZ3Vuaz4AAQIDPGxvdHMgb2YgYmluYXJ5IGd1bms+AAECAw== Ã…benraa That was a unicode key. t is t TestPlistlibcBs†eZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „ZRS(cCs"ytjtjƒWnnXdS(N(tostunlinkRtTESTFN(tself((s./usr/local/lib/python2.7/test/test_plistlib.pyttearDown\scCsâtddddddddd d ggd d d ddtdddddtdtdtddddddd dgƒƒdtjdƒdtjdd ƒd!tjdd ƒgd"tjd#d d$d d%d%ƒƒ }d&|d'<|S((NtaStringtDoodahtaListtAtBi g@@@iiitaFloatgà?tanIntiØtaDictt anotherStringst aUnicodeValueu Mässig, Maßt aTrueValuet aFalseValuet deeperDicttaitbtcttexttsomeDatas t someMoreDatasi t nestedDatataDateiÔii!sThat was a unicode key.uÃ…benraa(tdicttTruetFalsetplistlibtDatatdatetime(Rtpl((s./usr/local/lib/python2.7/test/test_plistlib.pyt_createbs"'! cCs<|jƒ}|j|ddƒ|j|ddtƒdS(NRR RR(R$t assertEqualR(RR#((s./usr/local/lib/python2.7/test/test_plistlib.pyt test_createws cCsQ|jƒ}tj|tjƒtjtjƒ}|jt|ƒt|ƒƒdS(N(R$R t writePlistRRt readPlistR%R(RR#tpl2((s./usr/local/lib/python2.7/test/test_plistlib.pyttest_io|s cCsi|jƒ}tj|ƒ}tj|ƒ}|jt|ƒt|ƒƒtj|ƒ}|j||ƒdS(N(R$R twritePlistToStringtreadPlistFromStringR%R(RR#tdataR)tdata2((s./usr/local/lib/python2.7/test/test_plistlib.pyt test_string‚s  cCsTitjdƒd6gggggggg}|jtjtj|ƒƒ|ƒdS(Ntaaaaaattest(R R!R%R,R+(RR-((s./usr/local/lib/python2.7/test/test_plistlib.pyttest_indentation_arrayŠs.c Cstiiiiiiiiitjdƒd6d6d6d6d6d6d6d 6d 6}|jtjtj|ƒƒ|ƒdS( NR0t9t8t7t6t5t4t3t2t1(R R!R%R,R+(RR-((s./usr/local/lib/python2.7/test/test_plistlib.pyttest_indentation_dictŽsNcCsciiiitjdƒd6gggggd6gd6d6}|jtjtj|ƒƒ|ƒdS(NR0R1R9R:R;(R R!R%R,R+(RR-((s./usr/local/lib/python2.7/test/test_plistlib.pyttest_indentation_dict_mix’s=cCs5tjtƒ}tj|ƒ}|j|tdƒdS(Ns2generated data was not identical to Apple's output(R R,tTESTDATAR+R%(RR#R-((s./usr/local/lib/python2.7/test/test_plistlib.pyttest_appleformatting–s cCs>|jƒ}tjtƒ}|jt|ƒt|ƒdƒdS(Ns2generated data was not identical to Apple's output(R$R R,R>R%R(RR#R)((s./usr/local/lib/python2.7/test/test_plistlib.pyttest_appleformattingfromliteralœs cCspddlm}|ƒ}|jƒ}tj||ƒtj||jƒƒƒ}|jt|ƒt|ƒƒdS(Niÿÿÿÿ(tStringIO(RAR$R R'R(tgetvalueR%R(RRAtfR#R)((s./usr/local/lib/python2.7/test/test_plistlib.pyt test_stringio¢s   cCspddlm}|ƒ}|jƒ}tj||ƒtj||jƒƒƒ}|jt|ƒt|ƒƒdS(Niÿÿÿÿ(RA( t cStringIORAR$R R'R(RBR%R(RRARCR#R)((s./usr/local/lib/python2.7/test/test_plistlib.pyttest_cstringioªs   cCsoxhtdƒD]Z}t|ƒ}d|}|dksA|dkrQtj|ƒq |jttj|ƒq WdS(Ni€sstring containing %si s (trangetchrR R+t assertRaisest ValueError(RtiRt testString((s./usr/local/lib/python2.7/test/test_plistlib.pyttest_controlcharacters²s   cCsld}ddddg}tjtj|ƒƒ}tjtj|ƒƒ}|j||ƒ|j||ƒdS(Ntabciii(R R,R+R%(Rttest1ttest2tresult1tresult2((s./usr/local/lib/python2.7/test/test_plistlib.pyttest_nondictroot¾s (t__name__t __module__RR$R&R*R/R2R<R=R?R@RDRFRMRS(((s./usr/local/lib/python2.7/test/test_plistlib.pyRZs             cCstjtƒdS(N(Rt run_unittestR(((s./usr/local/lib/python2.7/test/test_plistlib.pyt test_mainÇst__main__s ( tunittestR RR"R1RtreplaceR>tTestCaseRRWRT(((s./usr/local/lib/python2.7/test/test_plistlib.pyts    Pm