B
    18\                  @   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   yesF)ZfieldZ	morefielda3          [
        	[
        		"blorpie"
        	],
        	[
        		"whoops"
        	],
        	[],
        	"d-shtaeou",
        	"d-nthiouh",
        	"i-vhbjkhnth",
        	{
        		"nifty": 87
        	},
        	{
        		"field": "yes",
        		"morefield": false
        	}
        ]   T),z: )indent	sort_keys
separators	)r
   r   )textwrapdedentdumpsloadsassertEqual
expandtabs)selfhexpectd1d2Zd3Zd4Zd5Zh1Zh2Zh3 r   ^/oak/stanford/groups/akundaje/marinovg/programs/Python-3.7.3/Lib/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   jsondumpgetvalue)r
   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   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   s    r(   c               @   s   e Zd ZdS )TestCIndentN)r%   r&   r'   r   r   r   r   r)   C   s    r)   )	r   ior   Ztest.test_jsonr   r   r   r(   r)   r   r   r   r   <module>   s
   <