https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/simplejson/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/simplejson/tests/__pycache__/test_tool.cpython-310.pyc
o

\Փa��@s�ddlmZddlZddlZddlZddlZddlZddlZzddlm	Z	Wn#e
yIzddlm	Z	Wne
yFddlZdd�Z	YnwYnwdd�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/lib/python3/dist-packages/simplejson/tests/test_tool.pyrs��rcCsDtjdkrtjdd�}|j}||fSt��\}}t�|d�}||fS)N)��F)�deletezw+b)�sys�version_info�tempfile�NamedTemporaryFile�name�mkstemp�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�PIPE�communicate�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%r0r+r�expectr()r)r
r
r�test_stdin_stdoutMs�zTestTool.test_stdin_stdoutc	Cs\t�\}}z"|�|j���|��|�|j|gd�|j���Wt	�
|�dSt	�
|�w)N�r*)r�writer+r�closer%r0r1r(r�unlink)r)�infile�infile_namer
r
r�test_infile_stdoutRs
�zTestTool.test_infile_stdoutc	Cs�t�\}}z\|�|j���|��t�\}}z<|��|�|j||gd�g�t|d��}|�|���	d��
�|j�
��Wd�n1sHwYWt�
|�nt�
|�wWt�
|�dSt�
|�w)Nr3�rbr)rr4r+rr5r%r0�open�readr'r(r1rr6)r)r7r8�outfile�outfile_name�fr
r
r�test_infile_outfile]s(

����zTestTool.test_infile_outfile)NN)�__name__�
__module__�__qualname__r+�textwrap�dedentr1r0r2r9r@r
r
r
rr!s


r)�
__future__rrrrD�unittestr!r�test.supportr�ImportError�test.test_supportrr�TestCaserr
r
r
r�<module>s(���
	

https://t.me/RX1948 - 2025