Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/test/__pycache__/test_popen.cpython-39.opt-1.pyc

a

��g�@shdZddlZddlmZddlZddlZejZdevrBdedZGdd�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)�	PopenTestcCsbd}|t|f}t�|��}|��}Wd�n1s80Yt|�dd�}|�||�dS)Nz&%s -c "import sys; print(sys.argv)" %s�)�python�os�popen�read�eval�assertEqual)�selfZcmdlineZexpected�cmd�p�dataZgot�r�+/usr/local/lib/python3.9/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�	TypeErrorrr	rr�
reap_children�r
rrr�
test_popens���zPopenTest.test_popencCsR|�t�d���d�t�d���}tjdkr<|�|d�n|�t�|�d�dS)N�exit 0zexit 42�nt�*)rrr	�close�name�waitstatus_to_exitcode)r
�statusrrr�test_return_code-s

zPopenTest.test_return_codecCs>t�d�� }|�|��d�Wd�n1s00YdS�Nz
echo hellozhello
)rr	rr
�r
�frrr�test_contextmanager5szPopenTest.test_contextmanagercCs@t�d��"}|�t|�dg�Wd�n1s20YdSr")rr	r�listr#rrr�test_iterating9szPopenTest.test_iteratingcCs4tjdddd��Wd�n1s&0YdS)Nr�w���)r�mode�	buffering)rr	rrrr�
test_keywords=szPopenTest.test_keywordsN)	�__name__�
__module__�__qualname__rrr!r%r'r,rrrrrsr�__main__)�__doc__Zunittest�testrr�sys�
executablerZTestCaserr-�mainrrrr�<module>s.

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists