ó {G_Tc @s«ddlZddlZddlZddlmZddlmZdddddd d d d d g Zejdkr¢ej dddddddddg ƒnej j sej ƒpÃej ƒZy"xeD]ZejeƒqÐWWqek r ejdƒ‚qXnd„Zdejfd„ƒYZdefd„ƒYZdefd„ƒYZd efd!„ƒYZd"efd#„ƒYZd$„Zed%kr§eƒndS(&iÿÿÿÿN(t normalize(t test_supportt1_abcu2_asciiu 3_Grüß-Gottu4_Γειά-σαςu5_ЗдравÑтвуйтеu 6_ã«ã½ã‚“u7_השקצץסu 8_曨曩曫u9_曨שんдΓßu 10_΅´tdarwinu 11_΅ϓϔu12_¨ÌÏ’Ìϔu 13_ ̈ÌΎΫu14_ẛá¿á¿á¿Žá¿á¿á¿žá¿Ÿá¿­u 15_΅´𣏕u 16_   Au 17_â€â€â€Au 18_   Au19_ As>only NT+ and systems with Unicode-friendly filesystem encodingcCsbtjj|ƒr^x9tjt|ƒƒD]"}tjtjj||ƒƒq(Wtj|ƒndS(N(tostpathtexiststlistdirtunicodetunlinktjointrmdir(tdirnametfname((s,/usr/local/lib/python2.7/test/test_pep277.pytdeltree9s tUnicodeFileTestscBs­eZeeƒZd Zd„Zd„Zd„Z e d„Z d„Z d„Z ejejdkdƒd„ƒZejejdkdƒd „ƒZd „Zd „ZRS( cCs¿ytjtjƒWntk r'nXtƒ}x~|jD]s}tjjtj|j |ƒƒ}t |dƒ!}|j |dj dƒƒWdQXtj |ƒ|j|ƒq;W||_dS(Ntws sutf-8(RtmkdirRtTESTFNtOSErrortsettfilesRR tnormtopentwritetencodetstattadd(tselfRtnametf((s,/usr/local/lib/python2.7/test/test_pep277.pytsetUpGs  !  cCsttjƒdS(N(RRR(R((s,/usr/local/lib/python2.7/test/test_pep277.pyttearDownUscCs,|jr(t|tƒr(t|j|ƒS|S(N(t normal_formt isinstanceRR(Rts((s,/usr/local/lib/python2.7/test/test_pep277.pyRXscCs…|j|ƒ}||ƒWdQX|jj}t|tƒrU|jtjƒƒ}n|r|j||d|j ||fƒndS(Ns>Function '%s(%r) failed with bad filename in the exception: %r( t assertRaisest exceptiontfilenameR"tstrRtsystgetfilesystemencodingt assertEqualt__name__(RtfnR&texpected_exceptiontcheck_fn_in_exceptiontct exc_filename((s,/usr/local/lib/python2.7/test/test_pep277.pyt_apply_failure]s cCs¦xŸ|jD]”}d|}|jt|tƒ|jtj|tƒ|jtj|tƒ|jtj|tƒ|jtj |tƒ|jtj |tt ƒq WdS(Ntnot_( RR1RtIOErrorRRRtchdirR tremoveRtFalse(RR((s,/usr/local/lib/python2.7/test/test_pep277.pyt test_failuresjs cCsXxQ|jD]F}t|dƒ}|j|djdƒƒ|jƒtj|ƒq WdS(NRs sutf-8(RRRRtcloseRR(RRR((s,/usr/local/lib/python2.7/test/test_pep277.pyt test_openvs  Rsirrelevant test on Mac OS Xcstd„|jDƒƒ}tƒ}x@tddddgƒD]&‰|t‡fd†|DƒƒO}q;W||8}x’|D]Š}|jt|tƒ|jtj|tƒ|jtj|tƒ|jtj |tƒ|jtj |tƒ|jtj |tt ƒqvWdS(Ncss$|]}t|tƒr|VqdS(N(R"R(t.0R((s,/usr/local/lib/python2.7/test/test_pep277.pys ƒstNFCtNFDtNFKCtNFKDc3s|]}tˆ|ƒVqdS(N(R(R:tfile(tnf(s,/usr/local/lib/python2.7/test/test_pep277.pys †s( RRR1RR3RRRR4R R5RR6(RRtothersR((R@s,/usr/local/lib/python2.7/test/test_pep277.pyttest_normalizes $  cCsˆt|jƒ}tjtjƒ}tjttjtjƒƒƒ}td„|Dƒƒ}|j ||ƒ|j t |ƒt |ƒƒdS(Ncss-|]#}tjjttjƒ|ƒVqdS(N(RRR RRR(R:R((s,/usr/local/lib/python2.7/test/test_pep277.pys šs( RRRRRRRR(R)R*tlen(Rtsf0tf1tf2tsf2((s,/usr/local/lib/python2.7/test/test_pep277.pyt test_listdir”scCs8x1|jD]&}tj|dƒtjd|ƒq WdS(Nttmp(RRtrename(RR((s,/usr/local/lib/python2.7/test/test_pep277.pyt test_renamežscCs¼tjjtjdƒ}d}tjƒ}tj|ƒtj|ƒzVt|dƒ!}|j |dj dƒƒWdQXtj |tj ƒtj |ƒWdtj|ƒtj|ƒXdS(NuGrüß-曨曩曫u ß-曨曩曫Rs sutf-8(RRR RRtgetcwdRR4RRRtaccesstR_OKR5R (RR R&toldwdR((s,/usr/local/lib/python2.7/test/test_pep277.pyttest_directory£s      N(R+t __module__Rt filenamesRtNoneR!RR RtTrueR1R7R9tunittesttskipIfR(tplatformRBRHRKRP(((s,/usr/local/lib/python2.7/test/test_pep277.pyRCs     $$ tUnicodeNFCFileTestscBseZdZRS(R;(R+RQR!(((s,/usr/local/lib/python2.7/test/test_pep277.pyRX´stUnicodeNFDFileTestscBseZdZRS(R<(R+RQR!(((s,/usr/local/lib/python2.7/test/test_pep277.pyRY¸stUnicodeNFKCFileTestscBseZdZRS(R=(R+RQR!(((s,/usr/local/lib/python2.7/test/test_pep277.pyRZ¼stUnicodeNFKDFileTestscBseZdZRS(R>(R+RQR!(((s,/usr/local/lib/python2.7/test/test_pep277.pyR[ÀscCs2ztjtttttƒWdttjƒXdS(N( Rt run_unittestRRXRYRZR[RR(((s,/usr/local/lib/python2.7/test/test_pep277.pyt test_mainÄs t__main__(R(RRUt unicodedataRttestRRRRWtextendRtsupports_unicode_filenamesR)tgetdefaultencodingt fsencodingRRtUnicodeEncodeErrortSkipTestRtTestCaseRRXRYRZR[R]R+(((s,/usr/local/lib/python2.7/test/test_pep277.pytsN$      q