��Qc@s�ddlZddlmZddlmZddlmZmZdefd��YZdeefd��YZ d eefd
��YZ
dS(i�N(tStringIO(tOrderedDict(tPyTesttCTestt
TestDecodecBsGeZd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCsN|jddtj�}|jt|tj��|j|tjd��dS(Ns1.1tparse_float(tloadstdecimaltDecimalt
assertTruet
isinstancetassertEqual(tselftrval((s,/sys/lib/python2.7/json/tests/test_decode.pyttest_decimalscCs?|jddt�}|jt|t��|j|d�dS(Nt1t parse_intg�RtfloatR R
R(RR
((s,/sys/lib/python2.7/json/tests/test_decode.pyt
test_float
scCs1|jd�}|j|idd6dd6�dS(Ns,{ "key" : "value" , "k":"v" }tvaluetkeytvtk(RR(RR
((s,/sys/lib/python2.7/json/tests/test_decode.pyttest_decoder_optimizationsscCsh|j|jd�i�|j|jd�g�|j|jd�d�|j|jd�t�dS(Ns{}s[]s""u(RRtassertIsInstancetunicode(R((s,/sys/lib/python2.7/json/tests/test_decode.pyttest_empty_objectsscCsSd}dddddddg}|j|j|�t|��|j|j|dd��|�|j|jjt|�dd��|�|j|dt�}|j|t|��|jt|�t�|j|j|dtdd��t|��|j|jddt�t��|j|jddt�tdt�fg��dS(Ns?{"xkd":1, "kcw":2, "art":3, "hxm":4, "qrt":5, "pad":6, "hoy":7}txkditkcwitartithxmitqrtitpadithoyitobject_pairs_hookcSs|S(N((tx((s,/sys/lib/python2.7/json/tests/test_decode.pyt<lambda>$scSs|S(N((R#((s,/sys/lib/python2.7/json/tests/test_decode.pyR$&stobject_hookcSsdS(N(tNone(R#((s,/sys/lib/python2.7/json/tests/test_decode.pyR$,ss{}s
{"empty": {}}tempty(Ri(Ri(Ri(Ri(Ri(R i(R!i(RRtevaltjsontloadRRttype(Rtstptod((s,/sys/lib/python2.7/json/tests/test_decode.pyttest_object_pairs_hooks$"
cCs)d}d}|jt||j|�dS(Ns
[1, 2, 3]5s
Extra data(tassertRaisesRegexpt
ValueErrorR(RR,tmsg((s,/sys/lib/python2.7/json/tests/test_decode.pyttest_extra_data5scCs)d}d}|jt||j|�dS(Ns ["abc\y"]tescape(R0R1R(RR,R2((s,/sys/lib/python2.7/json/tests/test_decode.pyttest_invalid_escape:s( t__name__t
__module__RRRRR/R3R5(((s,/sys/lib/python2.7/json/tests/test_decode.pyRs tTestPyDecodecBseZRS((R6R7(((s,/sys/lib/python2.7/json/tests/test_decode.pyR8?stTestCDecodecBseZRS((R6R7(((s,/sys/lib/python2.7/json/tests/test_decode.pyR9@s(RRtcollectionsRt
json.testsRRtobjectRR8R9(((s,/sys/lib/python2.7/json/tests/test_decode.pyt<module>s8
|