관리-도구
편집 파일: test_recursion.cpython-311.pyc
� �܋f� � �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__� � �r/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-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<