Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.22.75.216
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_repl.cpython-310.pyc
o

ab��@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZejej
d�dd�ZGd	d
�d
ej�ZedkrCe��dSdS)z!Test the interactive interpreter.�N)�dedent)�cpython_only�SuppressCrashReport)�kill_python)�stdout�stderrcOshtj�tj�tj�d�}|ddg}|�|�|�dttj	��}d|d<t
j|ftjdt
j||d�|��S)	z�Run the Python REPL with the given arguments.

    kw is extra keyword args to pass to subprocess.Popen. Returns a Popen
    object.
    z<stdin>z-Ez-i�envZvt100ZTERMT)�
executable�text�stdinrr)
�os�path�join�dirname�sysr	�extend�
setdefault�dict�environ�
subprocess�Popen�PIPE)rr�args�kwZstdin_fnameZcmd_liner�r�7/usr/local/python-3.10/lib/python3.10/test/test_repl.py�
spawn_repls

��rc@s,eZdZedd��Zedd��Zdd�ZdS)�TestInteractiveInterpretercCsjd}t|�}t�}t��|j�|�Wd�n1swYt|�}|�d|�|�|jd�dS)Nz�
            import sys, _testcapi
            1/0
            print('After the exception.')
            _testcapi.set_nomemory(0)
            sys.exit(0)
        zAfter the exception.)��x)rrrr�writer�assertIn�
returncode��self�
user_input�p�outputrrr�test_no_memory)s�z)TestInteractiveInterpreter.test_no_memorycCs8d}t|�}t�}|j�|�t|�}|�|jd�dS)Na        x = """<?xml version="1.0" encoding="iso-8859-1"?>
        <test>
            <Users>
                <fun25>
                    <limits>
                        <total>0KiB</total>
                        <kbps>0</kbps>
                        <rps>1.3</rps>
                        <connections>0</connections>
                    </limits>
                    <usages>
                        <total>16738211KiB</total>
                        <kbps>237.15</kbps>
                        <rps>1.3</rps>
                        <connections>0</connections>
                    </usages>
                    <time_to_refresh>never</time_to_refresh>
                    <limit_exceeded_URL>none</limit_exceeded_URL>
                </fun25>
            </Users>
        </test>"""
        r)rrrr r�assertEqualr"r#rrr�test_multiline_string_parsing>sz8TestInteractiveInterpreter.test_multiline_string_parsingcCsFtd�}td�}td|�}|�|�d}|�|jd�|�d|�dS)NzY
            import os
            print("before close")
            os.close(0)
        zl
            from test.support import suppress_msvcrt_asserts
            suppress_msvcrt_asserts()
        z-crzbefore close)rr�communicater)r"r!)r$r%Zprepare_repl�processr'rrr�test_close_stdin_s
z+TestInteractiveInterpreter.test_close_stdinN)�__name__�
__module__�__qualname__rr(r*r-rrrrr's

 r�__main__)�__doc__rrZunittestr�textwraprZtest.supportrrZtest.support.script_helperrr�STDOUTrZTestCaserr.�mainrrrr�<module>sH�
© 2025 GrazzMean