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

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


��Qc@suddlmZmZddd��YZdefd��YZdeefd��YZdeefd	��YZd
S(i�(tPyTesttCTesttJSONTestObjectcBseZRS((t__name__t
__module__(((s//sys/lib/python2.7/json/tests/test_recursion.pyRst
TestRecursioncBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs�g}|j|�y|j|�Wntk
r7nX|jd�g}|g}|j|�y|j|�Wntk
r�nX|jd�g}||g}|j|�dS(Ns)didn't raise ValueError on list recursions5didn't raise ValueError on alternating list recursion(tappendtdumpst
ValueErrortfail(tselftxty((s//sys/lib/python2.7/json/tests/test_recursion.pyttest_listrecursion	s$


	


cCsmi}||d<y|j|�Wntk
r4nX|jd�i}i|d6|d6}|j|�dS(Nttests)didn't raise ValueError on dict recursiontatb(RRR	(R
RR((s//sys/lib/python2.7/json/tests/test_recursion.pyttest_dictrecursion s


cCs}d|jjfd��Y}|�}|j|jt�d�t|_y|jt�Wntk
rknX|jd�dS(NtRecursiveJSONEncodercBseZeZd�ZRS(cSs3|tkr#|jrtgSdSntjj|�S(NR(RtrecursetpyjsontJSONEncodertdefault(R
to((s//sys/lib/python2.7/json/tests/test_recursion.pyR1s
	(RRtFalseRR(((s//sys/lib/python2.7/json/tests/test_recursion.pyR/ss"JSONTestObject"s,didn't raise ValueError on default recursion(	tjsonRtassertEqualtencodeRtTrueRRR	(R
Rtenc((s//sys/lib/python2.7/json/tests/test_recursion.pyttest_defaultrecursion.s
		
c
Cs6|jt��|jddddd�WdQX|jt��|jddddd�WdQX|jt��|jddddd�WdQX|jt��|jddd	d
d�WdQX|jt��|jdddd
d�WdQX|jt��|jddd	d
d�WdQXdS(Ns{"a":i�t1t}s[1]t[t]u{"a":u1u}u[1]u[u](tassertRaisestRuntimeErrortloads(R
((s//sys/lib/python2.7/json/tests/test_recursion.pyt#test_highly_nested_objects_decodingDs#####cCs�gi}}x+td�D]}|gi|d6}}qW|jt��|j|�WdQX|jt��|j|�WdQXdS(Ni�tk(txrangeR#R$R(R
tltdR((s//sys/lib/python2.7/json/tests/test_recursion.pyt#test_highly_nested_objects_encodingVs
cCsLd|jjfd��Y}|jt��|dt�jd�WdQXdS(NtEndlessJSONEncodercBseZd�ZRS(cSs|gS(s?If check_circular is False, this will keep adding another list.((R
R((s//sys/lib/python2.7/json/tests/test_recursion.pyRcs(RRR(((s//sys/lib/python2.7/json/tests/test_recursion.pyR,bstcheck_circulary@(RRR#R$RR(R
R,((s//sys/lib/python2.7/json/tests/test_recursion.pyttest_endless_recursion`s(RRR
RRR&R+R.(((s//sys/lib/python2.7/json/tests/test_recursion.pyRs					
tTestPyRecursioncBseZRS((RR(((s//sys/lib/python2.7/json/tests/test_recursion.pyR/kstTestCRecursioncBseZRS((RR(((s//sys/lib/python2.7/json/tests/test_recursion.pyR0lsN((t
json.testsRRRtobjectRR/R0(((s//sys/lib/python2.7/json/tests/test_recursion.pyt<module>sc

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.