HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/simplejson/tests/__pycache__/test_indent.cpython-38.pyc
U

�O5[
�@s<ddlmZddlZddlZddlmZGdd�de�ZdS)�)�TestCaseN)�StringIOc@s$eZdZdd�Zdd�Zdd�ZdS)�
TestIndentc
Cs�dgdggdddddidd	d
�g}t�d�}t�|�}tj|dd
dd�}tj|dd
dd�}tj|dd
dd�}t�|�}t�|�}t�|�}	t�|�}
|�||�|�||�|�|	|�|�|
|�|�||�dd��|�||�dd��|�||�dS)NZblorpieZwhoopsz	d-shtaeouz	d-nthiouhzi-vhbjkhnthZnifty�WZyesF)ZfieldZ	morefielda3        [
        	[
        		"blorpie"
        	],
        	[
        		"whoops"
        	],
        	[],
        	"d-shtaeou",
        	"d-nthiouh",
        	"i-vhbjkhnth",
        	{
        		"nifty": 87
        	},
        	{
        		"field": "yes",
        		"morefield": false
        	}
        ]�	T��,�: )�indentZ	sort_keys�
separatorsz  �)�textwrap�dedent�json�dumps�loads�assertEqual�replace)�self�h�expect�d1Zd2Zd3Zd4Zh1Zh2Zh3Zh4�r�>/usr/lib/python3/dist-packages/simplejson/tests/test_indent.py�test_indents*�





zTestIndent.test_indentcs.ddi���fdd�}|dd�|dd�dS)N��csDtj�|d�}��||�t�}tj�||d���|��|�dS)N�r
)rrrr�dump�getvalue)r
ZexpectedrZsio�rrrr�check:s
z&TestIndent.test_indent0.<locals>.checkrz
{
"3": 1
}z{"3": 1}r)rr!rr r�test_indent08s	
zTestIndent.test_indent0cCs^ddddg}d}d}|�|tj|ddd	��|�|tj|dd
d	��|�|tj|dd��dS)Nrrr�z[
1,
2,
3,
4
]z[
1, 
2, 
3, 
4
]r)z, r	)r
rrr)rrr)rZlstrZ
expect_spacesrrr�test_separatorsGs���zTestIndent.test_separatorsN)�__name__�
__module__�__qualname__rr"r$rrrrrs0r)Zunittestrr
Z
simplejsonrZsimplejson.compatrrrrrr�<module>s