Yohohohohohooho | Sanrei Aya
Sanrei Aya


Server : LiteSpeed
System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : elvh3918 ( 1528)
PHP Version : 8.2.31
Disable Function : mail
Directory :  /lib64/python3.9/site-packages/simplejson/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python3.9/site-packages/simplejson/tests/__pycache__/test_tool.cpython-39.opt-1.pyc
a

\Փa��@s�ddlmZddlZddlZddlZddlZddlZddlZzddlm	Z	WnFe
y�zddlm	Z	Wn"e
y�ddlZdd�Z	Yn0Yn0dd�Z
Gdd	�d	ej�ZdS)
�)�with_statementN)�strip_python_stderrcCst�d��d��|���S)Nz\[\d+ refs\]\r?\n?$�)�re�sub�encode�strip)�stderr�r
�@/usr/lib64/python3.9/site-packages/simplejson/tests/test_tool.pyrs
�rcCs>tjdkrtjdd�}|j}nt��\}}t�|d�}||fS)N)��F)�deletezw+b)�sys�version_info�tempfileZNamedTemporaryFile�nameZmkstemp�os�fdopen)�file�filename�fdr
r
r�open_temp_files
rc@s<eZdZdZe�d�Zddd�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
        }
    ]
    NcCsptjddg}|r|�|�tj|tjtjtjd�}|�|�\}}|�t|�d�	��|�|j
d�|�d���S)Nz-mzsimplejson.tool)�stdinr	�stdoutrr�utf8)
r�
executable�extend�
subprocess�Popen�PIPEZcommunicate�assertEqualrr�
returncode�decode�
splitlines)�self�args�data�argv�proc�out�errr
r
r�runTool@s
�zTestTool.runToolcCs$|�|j|j��d�|j���dS)N)r()r"r-r(r�expectr%)r&r
r
r�test_stdin_stdoutMs�zTestTool.test_stdin_stdoutc	Cs^t�\}}zB|�|j���|��|�|j|gd�|j���Wt	�
|�nt	�
|�0dS)N�r')r�writer(r�closer"r-r.r%r�unlink)r&�infile�infile_namer
r
r�test_infile_stdoutRs
�zTestTool.test_infile_stdoutc	Cs�t�\}}z�|�|j���|��t�\}}zx|��|�|j||gd�g�t|d��0}|�|���	d��
�|j�
��Wd�n1s�0YWt�
|�nt�
|�0Wt�
|�nt�
|�0dS)Nr0�rbr)rr1r(rr2r"r-�open�readr$r%r.rr3)r&r4r5ZoutfileZoutfile_name�fr
r
r�test_infile_outfile]s$

��$zTestTool.test_infile_outfile)NN)�__name__�
__module__�__qualname__r(�textwrap�dedentr.r-r/r6r;r
r
r
rr!s


r)Z
__future__rrrr?ZunittestrrZtest.supportr�ImportErrorZtest.test_supportrrZTestCaserr
r
r
r�<module>s 	

Yohohohohohooho | Sanrei Aya