관리-도구
편집 파일: test_for_json.cpython-37.pyc
B VX�Y� � @ sv d dl Z d dlZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZG d d� de �Z G dd � d e j�ZdS )� Nc @ s e Zd Zdd� ZdS )�ForJsonc C s ddiS )N�for_json� � )�selfr r �Q/opt/alt/python37/lib64/python3.7/site-packages/simplejson/tests/test_for_json.pyr s zForJson.for_jsonN)�__name__� __module__�__qualname__r r r r r r s r c @ s e Zd Zdd� ZdS )� NestedForJsonc C s dt � iS )N�nested)r )r r r r r s zNestedForJson.for_jsonN)r r r r r r r r r s r c @ s e Zd Zdd� ZdS )�ForJsonListc C s dgS )N�listr )r r r r r s zForJsonList.for_jsonN)r r r r r r r r r s r c @ s e Zd Zdd� ZdS )�DictForJsonc C s ddiS )N�alphar r )r r r r r s zDictForJson.for_jsonN)r r r r r r r r r s r c @ s e Zd Zdd� ZdS )�ListForJsonc C s dgS )Nr r )r r r r r s zListForJson.for_jsonN)r r r r r r r r r s r c @ sn e Zd Zddd�Zdd� Zdd� Zdd � Zd d� Zdd � Zdd� Z dd� Z dd� Zdd� Zdd� Z dd� ZdS )�TestForJsonTc C s8 |d krt �|�}nt j||d�}| �t �|�|� d S )N)r )�json�dumpsZassertEqual�loads)r �obj�otherr �sr r r �assertRoundTrip s zTestForJson.assertRoundTripc C s | � t� t� �� � d S )N)r r r )r r r r �(test_for_json_encodes_stand_alone_object) s z4TestForJson.test_for_json_encodes_stand_alone_objectc C s | � dt� idt� �� i� d S )NZhooray)r r r )r r r r �+test_for_json_encodes_object_nested_in_dict. s z7TestForJson.test_for_json_encodes_object_nested_in_dictc C s0 | � ddt� ddgiddt� �� ddgi� d S )Nr r � � )r r r )r r r r �7test_for_json_encodes_object_nested_in_list_within_dict3 s zCTestForJson.test_for_json_encodes_object_nested_in_list_within_dictc C s | � t� dddii� d S )Nr r r )r r )r r r r �1test_for_json_encodes_object_nested_within_object8 s z=TestForJson.test_for_json_encodes_object_nested_within_objectc C s | � t� t� �� � d S )N)r r r )r r r r �test_for_json_encodes_list= s z&TestForJson.test_for_json_encodes_listc C s | � dt� idt� �� i� d S )Nr )r r r )r r r r �(test_for_json_encodes_list_within_objectB s z4TestForJson.test_for_json_encodes_list_within_objectc C s | � tdd�tdd��� � d S )Nr )�a)r r r )r r r r �#test_for_json_encodes_dict_subclassG s z/TestForJson.test_for_json_encodes_dict_subclassc C s | � tdg�tdg��� � d S )N�l)r r r )r r r r �#test_for_json_encodes_list_subclassL s z/TestForJson.test_for_json_encodes_list_subclassc C s, x&dD ]}| j tdd�ddi|d� qW d S )N)NFr )r"