ok

Mini Shell

Direktori : /lib64/python2.7/site-packages/simplejson/tests/
Upload File :
Current File : //lib64/python2.7/site-packages/simplejson/tests/test_decode.pyc

�
���Sc@@srddlmZddlZddlmZddlZddlmZddlm	Z	defd��YZ
dS(i(tabsolute_importN(tTestCase(tStringIO(tOrderedDictt
TestDecodecB@s�eZeed�s!d�Znd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�ZRS(
tassertIscC@s$|j||kd||f�dS(Ns%r is %r(t
assertTrue(tselftatb((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyRscC@sNtjddtj�}|jt|tj��|j|tjd��dS(Ns1.1tparse_float(tjsontloadstdecimaltDecimalRt
isinstancetassertEqual(Rtrval((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyttest_decimalscC@s?tjddt�}|jt|t��|j|d�dS(Nt1t	parse_intg�?(RRtfloatRRR(RR((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyt
test_floatscC@s1tjd�}|j|idd6dd6�dS(Ns,{   "key"    :    "value"    ,  "k":"v"    }tvaluetkeytvtk(RRR(RR((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyttest_decoder_optimizationsscC@ssd}|jtj|�t|��d}|jtj|�t|��d}|jtj|�t|��dS(Ns{}s[]s""(RRRteval(Rts((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyttest_empty_objectsscC@s�d}dddddddg}|jtj|�t|��|jtj|dd��|�|jtjt|�dd��|�tj|dt�}|j|t|��|jt|�t�|jtj|dtdd��t|��dS(Ns?{"xkd":1, "kcw":2, "art":3, "hxm":4, "qrt":5, "pad":6, "hoy":7}txkditkcwitartithxmitqrtitpadithoyitobject_pairs_hookcS@s|S(N((tx((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyt<lambda>,scS@s|S(N((R'((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyR(.stobject_hookcS@sdS(N(tNone(R'((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyR(5s(Ri(R i(R!i(R"i(R#i(R$i(R%i(RRRRtloadRRttype(RRtptod((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyttest_object_pairs_hook's"	cC@s]||�}t|d�t|d�\}}\}}|j||�|j||�dS(Nii(tsortedR(RtsourceRRRR	tctd((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pytcheck_keys_reuse8s-cC@s&djd�}|j|tj�dS(Nu2[{"a_key": 1, "b_é": 2}, {"a_key": 3, "b_é": 4}]tutf8(tencodeR4RR(RR((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyttest_keys_reuse_str>scC@sd}|j|tj�dS(Nu2[{"a_key": 1, "b_é": 2}, {"a_key": 3, "b_é": 4}](R4RR(RR((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyttest_keys_reuse_unicodeBscC@sn|jtjd�d�|jtjd�d�|jtjd�dg�|jtjd�dg�dS(Ns""tu""us[""]u[""](RRR(R((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyttest_empty_stringsFscC@s�tjj}|jiid6df|�jd��|jiid6df|dt�jd��|jiid6df|�jd��dS(NRi	s	{"a": {}}R&is 
{"a": {}}(RtdecodertJSONDecoderRt
raw_decodetdict(Rtcls((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyttest_raw_decodeLsc	C@s�tjj�}x[ddddddddd	g	D]8}|jt|jd
|�|jt|jd
|�q1Wtddgd
t�\}}t|�t|�}|jt|j||�|jt|j||�dS(Niiii����i����i����i����i����i����t1234t	128931233t	472389423R(	RR;R<tassertRaisest
ValueErrort	scan_onceR=R0tid(RtjtiR'tytdiff((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyttest_bounds_checkingZs((t__name__t
__module__thasattrRRRRRRR/R4R7R8R:R@RL(((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyR	s										(t
__future__RR
tunittestRt
simplejsonRtsimplejson.compatRRR(((sB/usr/lib64/python2.7/site-packages/simplejson/tests/test_decode.pyt<module>s

Zerion Mini Shell 1.0