a
    "h                      @   sZ   d dl Z d dlmZ d dlmZmZ G dd dZG dd deeZG dd	 d	eeZdS )
    N)StringIO)PyTestCTestc                   @   s   e Zd Zdd Zdd ZdS )
TestIndentc              
   C   s   dgdgg dddddidd	d
g}t d}| |}| j|dddd}| j|dddd}| j|ddd}| j|ddd}| |}| |}	| |}
| || | |	| | |
| | ||d | || | || | || d S )NZblorpieZwhoopsz	d-shtaeouz	d-nthiouhzi-vhbjkhnthZniftyW   ZyesF)ZfieldZ	morefielda3          [
        	[
        		"blorpie"
        	],
        	[
        		"whoops"
        	],
        	[],
        	"d-shtaeou",
        	"d-nthiouh",
        	"i-vhbjkhnth",
        	{
        		"nifty": 87
        	},
        	{
        		"field": "yes",
        		"morefield": false
        	}
        ]   T),z: )indent	sort_keysZ
separators	)r	   r
   )textwrapdedentdumpsloadsassertEqual
expandtabs)selfhexpectd1Zd2Zd3Zd4Zd5Zh1Zh2Zh3 r   B/opt/python-3.9.21/usr/lib/python3.9/test/test_json/test_indent.pytest_indent   s&    




zTestIndent.test_indentc                    s.   ddi  fdd}|dd |d d d S )N      c                    sF   j  | d}|| t }jj || d | | d S )N)r	   )r   r   r   Zjsondumpgetvalue)r	   Zexpectedr   sior   r   r   r   check4   s
    z&TestIndent.test_indent0.<locals>.checkr   z
{
"3": 1
}z{"3": 1}r   )r   r   r   r   r   test_indent02   s    	
zTestIndent.test_indent0N)__name__
__module____qualname__r   r    r   r   r   r   r      s   +r   c                   @   s   e Zd ZdS )TestPyIndentNr!   r"   r#   r   r   r   r   r$   B       r$   c                   @   s   e Zd ZdS )TestCIndentNr%   r   r   r   r   r'   C   r&   r'   )	r   ior   Ztest.test_jsonr   r   r   r$   r'   r   r   r   r   <module>   s
   <