Your IP : 216.73.216.213


Current Path : /opt/alt/python34/lib64/python3.4/test/test_json/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/test/test_json/__pycache__/test_tool.cpython-34.pyo

�
g f��@syddlZddlZddlZddlZddlZddlmZddlmZGdd�dej	�Z
dS)�N)�support)�assert_python_okc@sUeZdZdZejd�Zdd�Zdd�Zdd�Z	d	d
�Z
dS)�TestToolz�

        [["blorpie"],[ "whoops" ] , [
                                 ],	"d-shtaeou",
"d-nthiouh",
        "i-vhbjkhnth", {"nifty":87}, {"morefield" :	false,"field"
            :"yes"}  ]
           a.    [
        [
            "blorpie"
        ],
        [
            "whoops"
        ],
        [],
        "d-shtaeou",
        "d-nthiouh",
        "i-vhbjkhnth",
        {
            "nifty": 87
        },
        {
            "field": "yes",
            "morefield": false
        }
    ]
    c	Cs�tjtjddfdtjdtj��%}|j|jj��\}}WdQX|j|j	�|j
j�j	��|j|d�dS)Nz-mz	json.tool�stdin�stdout)�
subprocess�Popen�sys�
executable�PIPEZcommunicate�data�encode�assertEqual�
splitlines�expect)�self�proc�out�err�r�=/opt/alt/python34/lib64/python3.4/test/test_json/test_tool.py�test_stdin_stdout(s$%zTestTool.test_stdin_stdoutc
CsHtj}t|d��*}|jtj|�|j|j�WdQX|S)N�w)r�TESTFN�open�
addCleanup�os�remove�writer)r�infile�fprrr�_create_infile0s
	zTestTool._create_infilecCs`|j�}tdd|�\}}}|j|j�|jj�j��|j|d�dS)Nz-mz	json.tool�)r!rrrrr
)rr�rcrrrrr�test_infile_stdout7s%zTestTool.test_infile_stdoutc
Cs�|j�}tjd}tdd||�\}}}|jtj|�t|d�� }|j|j	�|j
�WdQX|j|d�|j|d�dS)Nz.outz-mz	json.tool�rr")r!rrrrrrrr�readr)rrZoutfiler#rrr rrr�test_infile_outfile=s
zTestTool.test_infile_outfileN)�__name__�
__module__�__qualname__r�textwrap�dedentrrr!r$r'rrrrr	s	r)rr	r+ZunittestrZtestrZtest.script_helperrZTestCaserrrrr�<module>s