| Server IP : 54.37.205.81 / Your IP : 216.73.216.76 Web Server : nginx/1.22.1 System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64 User : debian ( 1000) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/simplejson/tests/__pycache__/ |
Upload File : |
�
$��c� � �v � d dl mZ d dlZ G d� d� � Z G d� dej � � Z G d� de� � ZdS ) � )�TestCaseNc � � e Zd ZdS )�JSONTestObjectN)�__name__�
__module__�__qualname__� � �A/usr/lib/python3/dist-packages/simplejson/tests/test_recursion.pyr r s � � � � � ��Dr
r c � � e Zd ZdZd� ZdS )�RecursiveJSONEncoderFc �t � |t u r| j rt gS dS t j � |� � S )Nr )r �recurse�json�JSONEncoder�default)�self�os r r zRecursiveJSONEncoder.default s= � ������|�
(�&�'�'�'�'���'�'��*�*�*r
N)r r r r r r r
r r
r
s( � � � � � ��G�+� +� +� +� +r
r
c � � e Zd Zd� Zd� Zd� ZdS )�
TestRecursionc � � g }|� |� � t j |� � | � d� � n# t $ r Y nw xY wg }|g}|� |� � t j |� � | � d� � n# t $ r Y nw xY wg }||g}t j |� � d S )Nz)didn't raise ValueError on list recursionz5didn't raise ValueError on alternating list recursion)�appendr �dumps�fail�
ValueError�r �x�ys r �test_listrecursionz TestRecursion.test_listrecursion s� � ��� ������� C��J�q�M�M�M�
�I�I�A�B�B�B�B�� � � � ��D� ����
��
�C�� ������� O��J�q�M�M�M�
�I�I�M�N�N�N�N�� � � � ��D� ����
��
��F���
�1�
�
�
�
�
s# �A �
A�A�.B �
B%�$B%c � � i }||d<