Current File : //opt/imh-python/lib/python2.7/test/test_multibytecodec.pyc
�
��Wc@s�ddlmZddlmZddlZddlZddlZddlZddlZddl	Z	dddddd	d
ddd
ddddddddddddddgZ
dejfd��YZdejfd��YZ
d ejfd!��YZd"ejfd#��YZd$ejfd%��YZd&ejfd'��YZd(ejfd)��YZd*efd+��YZd,�Zed-kr�e�ndS(.i����(ttest_support(tTESTFNNtgb2312tgbktgb18030thzt	big5hkscstcp932t	shift_jisteuc_jpteuc_jisx0213tshift_jisx0213teuc_jis_2004tshift_jis_2004tcp949teuc_krtjohabtbig5tcp950t
iso2022_jptiso2022_jp_1tiso2022_jp_2tiso2022_jp_2004tiso2022_jp_3tiso2022_jp_extt
iso2022_krtTest_MultibyteCodeccBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs`xYtD]Q}|jdj|�d�|jtd|�d�|jdj|�d�qWdS(Ntu(tALL_CJKENCODINGStassertEqualtdecodetunicodetencode(tselftenc((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_nullcodings
cCs.x'tD]}|jdj|�d�qWdS(Ntabcd(RRR (R!R"((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_str_decode#s
cCsBtjd�}d�}tjd|�|jt|dd�dS(Nseuc-krcSsdtjdfS(Nui(tsystmaxint(texc((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyt<lambda>)sstest.cjktestsapple�ham�spam(tcodecst
getdecodertregister_errortassertRaisest
IndexError(R!tdect	myreplace((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_errorcallback_longindex's
	cCsTdtd�}tjdtj�x*tD]"}|j|j|d�d�q*WdS(Nidi�stest.ignoreR(tunichrR*R,t
ignore_errorsRRR (R!tdataR"((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyt test_errorcallback_custom_ignore.s
cBs,x%eD]}dj|�}|dUqWdS(Ns
# coding: {}
(Rtformat(R!R"tcode((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_codingspec5s
cCs0|jttjd�|jttjd�dS(N(R-tAttributeErrort_multibytecodectMultibyteStreamReadertNonetMultibyteStreamWriter(R!((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_init_segfault:s	
	(t__name__t
__module__R#R%R1R5R8R>(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyRs					tTest_IncrementalEncodercBs,eZd�Zd�Zd�Zd�ZRS(cCs�tjd��}|j|jd�d�|j|j�d�|j|jdt�d�|j|j�d�|j|jdt�d�|j|jdt�d�|j|j�d�dS(NRu파이썬 마을s��̽� ����u	☆∼☆s�١���uR(R*tgetincrementalencoderRR tresetR<tTruetFalse(R!tencoder((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_statelessDscCs�tjd��}|j|jd�d�|j|jd�d�|j|jd�d�|j|jdt�d�|j|j�d�|j|jd�d�|j|jd�d�|j|jdt�d�|j|jdt�d�dS(	Ntjisx0213uæ̀s��uæRùs��s��(R*RBRR RDRCR<(R!RF((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyt
test_statefulQscCs�tjd��}|j|jd�d�|jt|jd�|j|jd�d�|jt|jd�|j|j�d�|j|jd�d�|j|jd�d�|jt|jd�|j|jd	t�d
�dS(NRHuæRuģùæs��ùs��us��(	R*RBRR R-tUnicodeEncodeErrorRCR<RD(R!RF((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_stateful_keep_bufferdscCsKtjd�d�}|j|jd�d�|j|jd�d�dS(Ns	shift-jistbackslashreplaceuÿs\xffu
s
(R*RBRR (R!RF((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_issue5640ps(R?R@RGRIRKRM(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyRABs	
		tTest_IncrementalDecodercBs#eZd�Zd�Zd�ZRS(cCsatjd��}|j|jd�d�|j|jd�d�|j|jd�d�dS(NRs��̽u파이s� ����u
썬 마을Ru(R*tgetincrementaldecoderRR(R!tdecoder((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyt	test_dbcswscCs�tjd��}|j|jd�d�|jt|jdt�|j|jd�d�|j|jd�d�|jt|jdt�|j|jd�d�dS(NRs��u파Rs�u이s̽(R*RORRR-tUnicodeDecodeErrorRD(R!RP((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_dbcs_keep_buffer�scCs>tjd��}d}|j|j|d�d�|j|jdt�d�|j|j|d�d�|j|jd�d�|j|jd	�d�|j|jdt�d�|j|j�d�|j|jd
�d�|j|j|d�d�|jt|jdt�|j|jd�d�dS(
Ns
iso2022-jpst(utBt$sB@$u世s@$@s@$u@$R(	R*RORRRDRCR<R-RR(R!RPtESC((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_iso2022�s(R?R@RQRSRX(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyRNus			
tTest_StreamReadercBseZd�ZRS(cCsrzEttd�jd�tjtdd�}|jt|jd�Wdy|j�WnnXtj	t�XdS(Ntws�tencodingRi(
topenRtwriteR*R-RRtreadtclosetostunlink(R!tf((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_bug1728403�s(R?R@Rc(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyRY�stTest_StreamWritercBs_eZejed�dkd�d��Zejed�dkd�d��Zd�ZRS(u𒍅isneed a narrow buildcCstj�}tjd�|�}|jd�|j|j�d�|jd�|j|j�d�|jdd�|j|j�d�|jdddd�|j|j�d	�|jdd�|j|j�d	�|jt|j�|j|j�d	�dS(
NRu123t123u𒍅s123�7�9iiu가¬s123�7�9�7�9�7�9�7�5�0�1(	tStringIOR*t	getwriterR]RtgetvalueR-tUnicodeErrorRC(R!tstc((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_gb18030�s"

cCsktj�}tjd�|�}|jd�|j|j�d�|jd�|j|j�d�dS(Nsutf-8u123Reu𒍅s123𒍅(RfR*RgR]RRh(R!RjRk((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyt
test_utf_8�s

cCsHtj�}tjd�|�}|jd�|j|j�d�dS(NRR$(RfR*RgR]RRh(R!Rjtwr((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_streamwriter_strwrite�s
(R?R@tunittestt
skipUnlesstlenRlRmRo(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyRd�s''tTest_ISO2022cBs#eZd�Zd�Zd�ZRS(cCs)d}d}|j|jd�|�dS(Ns(B:hu4:unit.ANi de familleu:hu4:unité de famillesiso2022-jp-2(RR(R!t
iso2022jp2tuni((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_g2�scCsV|jddjd��x6dD].}dj|�}|jtd�|��q WdS(	Nsu­s
iso-2022-jp-2siso-2022-jp-2004s
iso-2022-jp-3u㐆cSs
|dkS(Ns�((tx((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyR)�s(siso-2022-jp-2004s
iso-2022-jp-3(tassertNotInR tassertFalsetfilter(R!R[te((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_iso2022_jp_g0�s
cCsUtjdkrt}n	d�}x-tdd�D]}||�jdd�q1WdS(NicSs$td|d?�td|d@�S(Ni��i
i�i�(R2(Rw((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyR)�sitiso_2022_jptignore(R&t
maxunicodeR2txrangeR (R!tmyunichrRw((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_bug1572832�s
		(R?R@RvR|R�(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyRs�s		tTestStatefulcBs;eZdZdZdZdZd�Zd�Zd�ZRS(u世世siso-2022-jps$B@$@$s
$B@$@$(BcCs&|j|jj|j�|j�dS(N(RttextR R[texpected_reset(R!((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_encode�scsNtj|j���dj�fd�|jD��}|j||j�dS(NRc3s|]}�j|�VqdS(N(R (t.0tchar(RF(sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pys	<genexpr>�s(R*RBR[tjoinR�Rtexpected(R!toutput((RFsq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_incrementalencoder�s
csjtj|j���t|j�d�dj��fd�t|j�D��}|j||j�dS(NiRc3s-|]#\}}�j||�k�VqdS(N(R (R�tindexR�(RFt
last_index(sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pys	<genexpr>s(	R*RBR[RrR�R�t	enumerateRR�(R!R�((RFR�sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyttest_incrementalencoder_finals(	R?R@R�R[R�R�R�R�R�(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyR��s		tTestHZStatefulcBs eZdZdZdZdZRS(u聊聊Rs~{ADADs~{ADAD~}(R?R@R�R[R�R�(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyR�scCstjt�dS(N(Rtrun_unittestR?(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyt	test_mainst__main__(ttestRttest.test_supportRRpRfR*R&R`R:RtTestCaseRRARNRYRdRsR�R�R�R?(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_multibytecodec.pyt<module>s,<	'3$9