Your IP : 216.73.216.85


Current Path : /opt/alt/python36/lib64/python3.6/test/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/test/__pycache__/test_repl.cpython-36.opt-2.pyc

3

��2a��@s�ddlZddlZddlZddlZddlmZddlmZmZddl	m
Z
ejejd�dd�Z
Gdd	�d	ej�Zed
kr~ej�dS)�N)�dedent)�cpython_only�SuppressCrashReport)�kill_python)�stdout�stderrcOsftjjtjjtj�d�}|ddg}|j|�|jdttj	��}d|d<t
j|ftjt
j||d�|��S)Nz<stdin>z-Ez-i�envZvt100ZTERM)�
executable�stdinrr)
�os�path�join�dirname�sysr	�extend�
setdefault�dict�environ�
subprocess�Popen�PIPE)rr�args�kwZstdin_fnameZcmd_liner�r�./opt/alt/python36/lib64/python3.6/test_repl.py�
spawn_repls


rc@seZdZedd��ZdS)�TestInteractiveInterpretercCs^d}t|�}|j�}t�}t��|jj|�WdQRXt|�}|jd|�|j|jd�dS)Nz�
            import sys, _testcapi
            1/0
            print('After the exception.')
            _testcapi.set_nomemory(0)
            sys.exit(0)
        sAfter the exception.��x)rr)	r�encoderrr
�writerZassertIn�
returncode)�selfZ
user_input�p�outputrrr�test_no_memory'sz)TestInteractiveInterpreter.test_no_memoryN)�__name__�
__module__�__qualname__rr%rrrrr%sr�__main__)rrZunittestr�textwraprZtest.supportrrZtest.support.script_helperrrZSTDOUTrZTestCaserr&�mainrrrr�<module>s