ó {G_Tc@sÉdZddlZddlZddlZddlZddlZdZdejfd„ƒYZ dejfd„ƒYZ de fd „ƒYZ d e fd „ƒYZ d „Z ed krÅe ƒndS(s› Test script for the unicodedata module. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. iÿÿÿÿNsutf-8tUnicodeMethodsTestcBseZdZd„ZRS(t(4504dffd035baea02c5b9de82bebc3d65e0e0bafcCsÔtjƒ}x¢tdƒD]”}t|ƒ}d|jƒd|jƒd|jƒd|jƒd|jƒd|j ƒd|j ƒd|j ƒd|j ƒd|djƒd|djƒd|djƒd|djƒd|djƒd|dj ƒd|dj ƒd|dj ƒd|dj ƒ|j ƒ|jƒ|jƒ|dj ƒ|djƒ|djƒ|djƒg}|jdj|ƒjtƒƒqW|jƒ}|j||jƒdS(Niu01uabcu123u uABCu(thashlibtsha1trangetunichrtisalnumtisalphat isdecimaltisdigittislowert isnumerictisspacetistitletisuppertlowertupperttitletupdatetjointencodetencodingt hexdigestt assertEqualtexpectedchecksum(tselfthtitchartdatatresult((s1/usr/local/lib/python2.7/test/test_unicodedata.pyttest_method_checksums>                 # (t__name__t __module__RR(((s1/usr/local/lib/python2.7/test/test_unicodedata.pyRstUnicodeDatabaseTestcBseZd„Zd„ZRS(cCsddl}||_dS(Niÿÿÿÿ(t unicodedatatdb(RR#((s1/usr/local/lib/python2.7/test/test_unicodedata.pytsetUpFs cCs |`dS(N(R$(R((s1/usr/local/lib/python2.7/test/test_unicodedata.pyttearDownLs(R R!R%R&(((s1/usr/local/lib/python2.7/test/test_unicodedata.pyR"Ds tUnicodeFunctionsTestcBsƒeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „ZRS(t(6ccf1b1a36460d2694f9b0b0f0324942fe70ede6c Csg}tjƒ}xÛtdƒD]Í}t|ƒ}t|jj|dƒƒt|jj|dƒƒt|jj|dƒƒ|jj |ƒ|jj |ƒ|jj |ƒt|jj |ƒƒt|jj |ƒƒg}|jdj|ƒƒqW|jƒ}|j||jƒdS(Niiÿÿÿÿt(RRRRtstrR$tdigittnumerictdecimaltcategoryt bidirectionalt decompositiontmirroredt combiningRRRRR(RRRRRR((s1/usr/local/lib/python2.7/test/test_unicodedata.pyttest_function_checksumTs   cCsá|j|jjddƒdƒ|j|jjdƒdƒ|j|jjddƒdƒ|j|jjdƒdƒ|j|jjddƒdƒ|jt|jjƒ|jt|jjdƒ|jt|jjdƒdS( NuAu9i uâ…›u⑨uð €€uxxux(RR$R+tNonet assertRaisest TypeErrort ValueError(R((s1/usr/local/lib/python2.7/test/test_unicodedata.pyt test_digitiscCsú|j|jjddƒdƒ|j|jjdƒdƒ|j|jjdƒdƒ|j|jjdƒdƒ|j|jjdƒd ƒ|j|jjd dƒdƒ|jt|jjƒ|jt|jjd ƒ|jt|jjd ƒdS( NuAu9i uâ…›gÀ?u⑨g"@u꘧g@uð €€uxxux(RR$R,R4R5R6R7(R((s1/usr/local/lib/python2.7/test/test_unicodedata.pyt test_numerictscCsä|j|jjddƒdƒ|j|jjdƒdƒ|j|jjddƒdƒ|j|jjddƒdƒ|j|jjddƒdƒ|jt|jjƒ|jt|jjdƒ|jt|jjdƒdS( NuAu9i uâ…›u⑨uð €€uxxux(RR$R-R4R5R6R7(R((s1/usr/local/lib/python2.7/test/test_unicodedata.pyt test_decimal€scCs£|j|jjdƒdƒ|j|jjdƒdƒ|j|jjdƒdƒ|j|jjdƒdƒ|jt|jjƒ|jt|jjd ƒdS( Nu￾tCnuatLluAtLuuð €€tLouxx(RR$R.R5R6(R((s1/usr/local/lib/python2.7/test/test_unicodedata.pyt test_category‹s cCs£|j|jjdƒdƒ|j|jjdƒdƒ|j|jjdƒdƒ|j|jjdƒdƒ|jt|jjƒ|jt|jjdƒdS( Nu￾R)u tWSuAtLuð €€uxx(RR$R/R5R6(R((s1/usr/local/lib/python2.7/test/test_unicodedata.pyttest_bidirectional”s cCsk|j|jjdƒdƒ|j|jjdƒdƒ|jt|jjƒ|jt|jjdƒdS(Nu￾R)u¼s 0031 2044 0034uxx(RR$R0R5R6(R((s1/usr/local/lib/python2.7/test/test_unicodedata.pyttest_decompositionscCs£|j|jjdƒdƒ|j|jjdƒdƒ|j|jjdƒdƒ|j|jjdƒdƒ|jt|jjƒ|jt|jjdƒdS(Nu￾iuauâˆiuð €€uxx(RR$R1R5R6(R((s1/usr/local/lib/python2.7/test/test_unicodedata.pyt test_mirrored¤s cCs£|j|jjdƒdƒ|j|jjdƒdƒ|j|jjdƒdƒ|j|jjdƒdƒ|jt|jjƒ|jt|jjdƒdS(Nu￾iuau⃡iæuð €€uxx(RR$R2R5R6(R((s1/usr/local/lib/python2.7/test/test_unicodedata.pyttest_combining­s cCsU|jt|jjƒ|jt|jjddƒ|j|jjddƒdƒdS(NtunknownuxxtNFKCu(R5R6R$t normalizeR7R(R((s1/usr/local/lib/python2.7/test/test_unicodedata.pyttest_normalize¶scCsMdddd ddf}x-|D]%}|j|jjd|ƒ|ƒq WdS( Nuେ̀ାuᄀ̀ᅡu LiÌt-sá¹³Ìuमारà¥à¤• ज़uà¥à¤•ेरबरà¥à¤—uकिरà¥à¤—िज़su\u0938\u094d\u0924\u093e\u0928tNFCu.मारà¥à¤• ज़à¥à¤•ेरबरà¥à¤—(RR$RH(Rtcomposedttext((s1/usr/local/lib/python2.7/test/test_unicodedata.pyt test_pr29½s  cCs?ddd}ddd}|j|jjd|ƒ|ƒdS(NuC̸iuÇuÇRJ(RR$RH(Rtatb((s1/usr/local/lib/python2.7/test/test_unicodedata.pyttest_issue10254ÉscCsã|jj}|jt|dƒ|jt|dƒ|jt|dƒ|j|dƒdƒ|j|dƒdƒ|j|dƒd ƒ|j|d ƒd ƒ|j|d ƒd ƒ|j|dƒdƒ|j|dƒd ƒdS(NRNuurautNu tNau좔tWuヲtHu?tFuâ€tAuð €€(R$teast_asian_widthR5R6R(Rteaw((s1/usr/local/lib/python2.7/test/test_unicodedata.pyttest_east_asian_widthÏs (R R!RR3R8R9R:R?RBRCRDRERIRMRPRY(((s1/usr/local/lib/python2.7/test/test_unicodedata.pyR'Os    tUnicodeMiscTestcBsPeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS(cCspd}tjd|g}tj|dtjƒ}|jƒ|j|jdƒd}|j||j j ƒƒdS(NsGimport sys;sys.modules['unicodedata'] = None;eval("u'\N{SOFT HYPHEN}'")s-ctstderrisUSyntaxError: (unicode error) \N escapes not supported (can't load unicodedata module)( tsyst executablet subprocesstPopentPIPEtwaitRt returncodetassertInR[tread(Rtcodetargstpopenterror((s1/usr/local/lib/python2.7/test/test_unicodedata.pyt#test_failed_import_during_compilingÞs cCsŠd}xjtdƒD]\}t|ƒ}|jj|dƒ}|dkr|j||jj|ƒƒ|d7}qqW|j|dkƒdS(Niiiÿÿÿÿii (txrangeRR$R-RR,t assertTrue(RtcountRtctdec((s1/usr/local/lib/python2.7/test/test_unicodedata.pyttest_decimal_numeric_consistentñs  cCsŠd}xjtdƒD]\}t|ƒ}|jj|dƒ}|dkr|j||jj|ƒƒ|d7}qqW|j|dkƒdS(Niiiÿÿÿÿii (RjRR$R+RR,Rk(RRlRRmRn((s1/usr/local/lib/python2.7/test/test_unicodedata.pyttest_digit_numeric_consistentþs  cCs |j|jjdƒdƒdS(NsGOTHIC LETTER FAIHUuð†(RR$tlookup(R((s1/usr/local/lib/python2.7/test/test_unicodedata.pyttest_bug_1704793 scCs‹ddl}|j|jdƒƒ|j|jjdƒ ƒ|jdjƒdkƒ|jdjƒdkƒ|jdjƒdkƒdS(Niÿÿÿÿu༺uauAuáµ¹uê½u.(R#RkR1t ucd_3_2_0R(RR#((s1/usr/local/lib/python2.7/test/test_unicodedata.pyt test_ucd_510s  cCs…|jdjƒdƒ|jgttjdƒD]D}dt|ƒjƒt|ƒjƒt|ƒjƒkr0|^q0dgƒdS(Nuáµ¹iui(RRRR\t maxunicodeRRR(RRm((s1/usr/local/lib/python2.7/test/test_unicodedata.pyt test_bug_5828s AcCsF|jdjƒdƒ|jdjƒdƒ|jdjƒdƒdS(NuÇ„uÇ…udž(RR(R((s1/usr/local/lib/python2.7/test/test_unicodedata.pyt test_bug_4971$sc CszxstdƒD]e}t|ƒdjƒ}|dkrU|jt|ƒd d|ƒq |jt|ƒdd|ƒq WdS(NiuAi i i i i…iiii( i) is\u%.4x should be a linebreakis \u%.4x should not be a linebreak( i i i i i…iiii( i) (RRt splitlinesRtlen(RRtlines((s1/usr/local/lib/python2.7/test/test_unicodedata.pyttest_linebreak_7643*s ( R R!RiRoRpRrRtRvRwR{(((s1/usr/local/lib/python2.7/test/test_unicodedata.pyRZÜs   cCstjjtttƒdS(N(ttestt test_supportt run_unittestRZRR'(((s1/usr/local/lib/python2.7/test/test_unicodedata.pyt test_main5s t__main__(t__doc__R\tunittestRR^ttest.test_supportR|RtTestCaseRR"R'RZRR (((s1/usr/local/lib/python2.7/test/test_unicodedata.pyts     0 Y