Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/test/__pycache__/test_popen.cpython-38.opt-1.pyc
U

>��g��@shdZddlZddlmZddlZddlZejZdekrBdedZGdd�dej�Z	e
dkrde��dS)	zQBasic tests for os.popen()

  Particularly useful for platforms that fake popen.
�N)�support� �"c@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�	PopenTestc	CsNd}|t|f}t�|��}|��}W5QRXt|�dd�}|�||�dS)Nz&%s -c "import sys; print(sys.argv)" %s�)�python�os�popen�read�eval�assertEqual)�selfZcmdlineZexpected�cmd�p�dataZgot�r�./opt/cppython/lib/python3.8/test/test_popen.py�_do_test_commandlineszPopenTest._do_test_commandlinecCsN|�ttj�|�dddg�|�ddddg�|�ddddg�t��dS)	Nzfoo barZfooZbarz foo "spam and eggs" "silly walk"z
spam and eggsz
silly walkzfoo "a \"quoted\" arg" barza "quoted" arg)ZassertRaises�	TypeErrorrr	rr�
reap_children�r
rrr�
test_popens���zPopenTest.test_popencCsR|�t�d���d�tjdkr8|�t�d���d�n|�t�d���d�dS)N�exit 0�ntzexit 42�*i*)rrr	�close�namerrrr�test_return_code-s
zPopenTest.test_return_codec	Cs*t�d��}|�|��d�W5QRXdS�Nz
echo hellozhello
)rr	rr
�r
�frrr�test_contextmanager4szPopenTest.test_contextmanagerc	Cs,t�d��}|�t|�dg�W5QRXdSr)rr	r�listrrrr�test_iterating8szPopenTest.test_iteratingc	Cs tjdddd��W5QRXdS)Nr�w���)r�mode�	buffering)rr	rrrr�
test_keywords<szPopenTest.test_keywordsN)	�__name__�
__module__�__qualname__rrrr!r#r(rrrrrsr�__main__)�__doc__Zunittest�testrr�sys�
executablerZTestCaserr)�mainrrrr�<module>s-

F1le Man4ger