관리-도구
편집 파일: test_recursion.cpython-37.opt-1.pyc
B VX�Y� � @ sH d dl mZ d dlZG dd� d�ZG dd� dej�ZG dd� de�ZdS ) � )�TestCaseNc @ s e Zd ZdS )�JSONTestObjectN)�__name__� __module__�__qualname__� r r �R/opt/alt/python37/lib64/python3.7/site-packages/simplejson/tests/test_recursion.pyr s r c @ s e Zd ZdZdd� ZdS )�RecursiveJSONEncoderFc C s$ |t kr| jrt gS dS tj�|�S )Nr )r �recurse�json�JSONEncoder�default)�self�or r r r s zRecursiveJSONEncoder.defaultN)r r r r r r r r r r s r c @ s$ e Zd Zdd� Zdd� Zdd� ZdS )� TestRecursionc C s� g }|� |� yt�|� W n tk r0 Y nX | �d� g }|g}|� |� yt�|� W n tk rr Y nX | �d� g }||g}t�|� d S )Nz)didn't raise ValueError on list recursionz5didn't raise ValueError on alternating list recursion)�appendr �dumps� ValueError�fail)r �x�yr r r �test_listrecursion s$ z TestRecursion.test_listrecursionc C sV i }||d<