ok

Mini Shell

Direktori : /proc/thread-self/root/usr/lib64/python2.7/site-packages/simplejson/tests/
Upload File :
Current File : //proc/thread-self/root/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyc

�
���Sc@svddlZddlZddlmZddlZddlmZmZm	Z	m
Z
mZdefd��YZdS(i����N(tTestCase(tunichrt	text_typetbtutBytesIOtTestUnicodecBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�ZRS(cCsYtjdd�}d}|jd�}|j|�}|j|�}|j||�dS(Ntencodingsutf-8uαΩ(tjsontJSONEncodertencodetassertEqual(tselftencoderRtstjutjs((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyttest_encoding1	scCsSd}|jd�}tj|dd�}tj|dd�}|j||�dS(NuαΩsutf-8R(R
RtdumpsR(RRRRR((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyttest_encoding2s
cCs)d}tj|�}|j|d�dS(NuαΩs"\u03b1\u03a9"(RRR(RRtj((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyttest_encoding3scCs,d}tj|g�}|j|d�dS(NuαΩs["\u03b1\u03a9"](RRR(RRR((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyttest_encoding4scCs7d}tj|dt�}|j|d|d�dS(NuαΩtensure_asciiu"(RRtFalseR(RRR((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyttest_encoding5"scCs:d}tj|gdt�}|j|d|d�dS(NuαΩRu["u"](RRRR(RRR((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyttest_encoding6'scCsBd}|jtj|�d�|jtj|dt�d�dS(Nu𝄠s"\ud834\udd20"Ru"𝄠"(RRRR(RR((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyttest_big_unicode_encode,scCsDd}|jtjd|d�|�|jtjd�|�dS(Nuz𝄠xt"s"z\ud834\udd20x"(RRtloads(RR((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyttest_big_unicode_decode1s!cCsPxItdd�D]8}t|�}d|f}|jtj|�|�qWdS(Nii��s"\u%04x"(trangeRRRR(RtiRR((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyttest_unicode_decode6s
cCs�d}dddddddg}|jtj|�t|��|jtj|dd��|�tj|dtj�}|j|tj|��|jt|�tj�|jtj|dtjdd��tj|��dS(Nu?{"xkd":1, "kcw":2, "art":3, "hxm":4, "qrt":5, "pad":6, "hoy":7}uxkdiukcwiuartiuhxmiuqrtiupadiuhoyitobject_pairs_hookcSs|S(N((tx((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt<lambda>Bstobject_hookcSsdS(N(tNone(R#((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyR$Is(uxkdi(ukcwi(uarti(uhxmi(uqrti(upadi(uhoyi(RRRtevaltOrderedDictttype(RRtptod((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt#test_object_pairs_hook_with_unicode=s"		cCs-|jtjdjd��idd6�dS(Nu{"a": "é"}sutf-8uéta(RRRR
(R((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyttest_default_encodingMscCse|jttjd��t�|jttjd��t�|jttjd�d�t�dS(Nu""u"a"u["a"]i(RR)RRR(R((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyttest_unicode_preservationQscCs�|jttjgdt��t�|jttjddt��t�|jttjidt��t�|jttjddt��t�dS(NRit(RR)RRRR(R((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt'test_ensure_ascii_false_returns_unicodeVs%%%cCs�itd�d6}itd�d6}d}d}|jtj|�|�|jtj|�|�|jtj|dt�|�|jtj|dt�|�dS(NsArrêt sur imagesuquuxsArr�t sur imagess!{"quux": "Arr\u00eat sur images"}u{"quux": "Arrêt sur images"}R(RRRRRR(Rtdoc1tdoc2t	doc_asciitdoc_unicode((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt+test_ensure_ascii_false_bytestring_encoding]scCs�d}|jd�}d}|jtj|�|�|jtj|�|�|jtj|dt�|�|jtj|dt�|�dS(Nu

tutf8s"\u2029\u2028"R(R
RRRR(Rts1ts2texpect((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt$test_ensure_ascii_linebreak_encodinghscCs�|jtjtjd�|jtjtjd�|jtjtjd�|jtjtjd�|jtjtjd�|jtjtjd�|jtjtjd�|jtjtjd�|jtjtjd	�tjd
kr�|jtjtjd�|jtjtjd�|jtjtjd
�|jtjtjd�|jtjtjd�|jtjtjd�|jtjtjd�|jtjtjd�ndS(Ns"\us"\u1s"\u12s"\u123s"\u1234s"\u123x"s"\u12x4"s"\u1x34"s"\ux234"i��s
"\ud800\u"s"\ud800\u0"s"\ud800\u00"s
"\ud800\u000"s"\ud800\u000x"s"\ud800\u00x0"s"\ud800\u0x00"s"\ud800\ux000"(tassertRaisesRtJSONDecodeErrorRtsyst
maxunicode(R((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyttest_invalid_escape_sequencesrs$cCs|xHtttdd��D].}|jtj|dt�tj|��qWd}|jtj|dt�d|d�dS(NiiRu☃R(tmapRRRRRR(Rtctsnowman((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyttest_ensure_ascii_still_works�scCs~d}tjttj|��}|jtjt|��|�x6||jd�fD]}|jtj	|�|�qWWdS(NuこんにちわR7(
tcodecstBOM_UTF8RRRRtloadRtdecodeR(Rtcontenttjson_doctdoc((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyttest_strip_bom�s
(t__name__t
__module__RRRRRRRRR!R,R.R/R1R6R;R@RDRL(((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyRs$															
		(
R>REtunittestRt
simplejsonRtsimplejson.compatRRRRRR(((sC/usr/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt<module>s
(

Zerion Mini Shell 1.0