Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/json/tests/test_decode.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��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.pyttest_decimalscCs?|jddt�}|jt|t��|j|d�dS(Nt1t	parse_intg�RtfloatR	R
R(RR
((s,/sys/lib/python2.7/json/tests/test_decode.pyt
test_float
scCs1|jd�}|j|idd6dd6�dS(Ns,{   "key"    :    "value"    ,  "k":"v"    }tvaluetkeytvtk(RR(RR
((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(Rtstptod((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(RR,tmsg((s,/sys/lib/python2.7/json/tests/test_decode.pyttest_extra_data5scCs)d}d}|jt||j|�dS(Ns	["abc\y"]tescape(R0R1R(RR,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						tTestPyDecodecBseZRS((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>s8

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.