403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/test_json/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/test_json/__pycache__/test_tool.cpython-36.pyc
3

�w2_z�@s^ddlZddlZddlZddlZddlmZmZddlmZddl	m
Z
Gdd�dej�ZdS)�N)�Popen�PIPE)�support)�assert_python_okc@sTeZdZdZejd�Zejd�Zdd�Zdd�Z	dd	�Z
d
d�Zdd
�Zdd�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
        }
    ]
    a.    [
        [
            "blorpie"
        ],
        [
            "whoops"
        ],
        [],
        "d-shtaeou",
        "d-nthiouh",
        "i-vhbjkhnth",
        {
            "nifty": 87
        },
        {
            "morefield": false,
            "field": "yes"
        }
    ]
    c
Csftjddf}t|tttd��}|j|jj��\}}WdQRX|j|j�|j	j�j��|j|d�dS)Nz-mz	json.tool)�stdin�stdout�stderr�)
�sys�
executablerrZcommunicate�data�encode�assertEqual�
splitlines�expect)�self�args�proc�out�err�r�=/opt/alt/python36/lib64/python3.6/test/test_json/test_tool.py�test_stdin_stdout?s
zTestTool.test_stdin_stdoutc
Cs:tj}t|d�� }|jtj|�|j|j�WdQRX|S)N�w)r�TESTFN�open�
addCleanup�os�remove�writer
)r�infile�fprrr�_create_infileFs
zTestTool._create_infilecCsP|j�}tdd|�\}}}|j|d�|j|j�|jj�j��|j|d�dS)Nz-mz	json.toolrr
)r#rrrrr)rr!�rcrrrrr�test_infile_stdoutMs
zTestTool.test_infile_stdoutc
Cs�|j�}tjd}tdd||�\}}}|jtj|�t|d��}|j|j	�|j
�WdQRX|j|d�|j|d�|j|d�dS)Nz.outz-mz	json.tool�rrr
)r#rrrrrrrr�readr)rr!Zoutfiler$rrr"rrr�test_infile_outfileTs
zTestTool.test_infile_outfilecCs>tddd�\}}}|j|d�|j|jd��|j|d�dS)Nz-mz	json.toolz-hrsusage: r
)rrZ
assertTrue�
startswith)rr$rrrrr�test_help_flag_szTestTool.test_help_flagcCsR|j�}tddd|�\}}}|j|d�|j|j�|jj�j��|j|d�dS)Nz-mz	json.toolz--sort-keysrr
)r#rrr�expect_without_sort_keysr)rr!r$rrrrr�test_sort_keys_flages
zTestTool.test_sort_keys_flagN)�__name__�
__module__�__qualname__r
�textwrap�dedentr+rrr#r%r(r*r,rrrrr
sr)
rrr0Zunittest�
subprocessrrZtestrZtest.support.script_helperrZTestCaserrrrr�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit