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.141.38.233
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_popen.cpython-310.pyc
o

abO�@s�dZddlZddlmZddlZddlZeed�se�d��ejZ	de	vr+de	dZ	Gdd	�d	ej
�Zed
kr>e�
�dSdS)zQBasic tests for os.popen()

  Particularly useful for platforms that fake popen.
�N)�support�popenzneed os.popen()� �"c@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�	PopenTestcCsbd}|t|f}t�|��}|��}Wd�n1swYt|�dd�}|�||�dS)Nz&%s -c "import sys; print(sys.argv)" %s�)�python�osr�read�eval�assertEqual)�selfZcmdlineZexpected�cmd�p�dataZgot�r�8/usr/local/python-3.10/lib/python3.10/test/test_popen.py�_do_test_commandlines
�zPopenTest._do_test_commandlinecCsJ|�ttj�|�dddg�|�dgd��|�dgd��t��dS)Nzfoo bar�foo�barz foo "spam and eggs" "silly walk")rz
spam and eggsz
silly walkzfoo "a \"quoted\" arg" bar)rza "quoted" argr)ZassertRaises�	TypeErrorr	rrr�
reap_children�r
rrr�
test_popen s���zPopenTest.test_popencCsT|�t�d���d�t�d���}tjdkr|�|d�dS|�t�|�d�dS)N�exit 0zexit 42�nt�*)rr	r�close�name�waitstatus_to_exitcode)r
�statusrrr�test_return_code0s

zPopenTest.test_return_codecCs@t�d��}|�|��d�Wd�dS1swYdS�Nz
echo hellozhello
)r	rrr
�r
�frrr�test_contextmanager8s"�zPopenTest.test_contextmanagercCsBt�d��}|�t|�dg�Wd�dS1swYdSr")r	rr�listr#rrr�test_iterating<s"�zPopenTest.test_iteratingcCs6tjdddd��	Wd�dS1swYdS)Nr�w���)r�mode�	buffering)r	rrrrr�
test_keywords@s"�zPopenTest.test_keywordsN)	�__name__�
__module__�__qualname__rrr!r%r'r,rrrrrsr�__main__)�__doc__Zunittest�testrr	�sys�hasattrZSkipTest�
executablerZTestCaserr-�mainrrrr�<module>s

.�
© 2025 GrazzMean