Current File : //opt/imh-python/lib/python2.7/test/test_popen2.pyc
�
��Wc@s7dZddlZejdde�ejdde�ddlZddlZddlZddlZddlm	Z	m
Z
ejd dks�ejd	 d
kr�ejdej��nyddlm
Z
[
Wn$ek
r�dd
lmZ[nXdejfd��YZd�Zedkr3e�ndS(sTest script for popen2.pyi����Ntignores.*popen2 module is deprecated.*sos\.popen. is deprecated.*(trun_unittestt
reap_childrenitbeositatheosspopen2() doesn't work on (tpopen(tforkt
Popen2TestcBs�eZdZejdkr$dZndZej�Zd�Zd�Z	dd�Zd�Zd�Z
d	�Zd
�Zd�ZRS(
tcattnttmoresab cd
cCsDtj�|jtjdtgtjD]}|j^q&��dS(NsActive pipes when test starts(tpopen2t_cleanuptassertFalset_activetreprtcmd(tselftc((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_popen2.pytsetUp*s
cCs�xtjD]}|j�q
Wtj�|jtjd�ddl}x|jD]}|j�qQW|j�|j|jd�t�dS(Nspopen2._active not emptyi����ssubprocess._active not empty(RRtwaitRR
t
subprocessR(RtinstR((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_popen2.pyttearDown0s

cCsy|j|�|j�|j�}|j||j�d||f�|dk	ru|j�}|j|d|�ndS(Nswrote %r read %rsunexpected %r on stderr(twritetclosetreadtassertEqualtstriptNoneR
(Rtteststrtexpected_outtrtwtetgot((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_popen2.pytvalidate_output=s

cCs8tj|j�\}}|j|j|j||�dS(N(RRR$Rtexpected(RR R!((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_popen2.pyttest_popen2HscCs�tjdkrOtj|jg�\}}}|j|j|j|||�ntj|j�\}}}|j|j|j|||�dS(Ntposix(tostnameRtpopen3RR$RR%(RR R!R"((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_popen2.pyttest_popen3Ls
"cCs�tjdkr�tj|jg�\}}|j|j|j||�tjd|jg�\}}|j�}|j||jd�ntj|j�\}}|j|j|j||�dS(NR'techos
(	R(R)RRR$RR%RR(RR!R R#((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_popen2.pyttest_os_popen2TscCs�tjdkr�tj|jg�\}}}|j|j|j|||�tjd|jg�\}}}|j�}|j||jd�|j�}|j	|d|�ntj|j�\}}}|j|j|j|||�dS(NR'R,s
sunexpected %r on stderr(
R(R)R*RR$RR%RRR
(RR!R R"R#((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_popen2.pyttest_os_popen3as!cCs�tjdkr�tj|jg�\}}|j|j|j||�tjd|jg�\}}|j�}|j||jd�ntj|j�\}}|j|j|j||�dS(NR'R,s
(	R(R)tpopen4RR$RR%RR(RR!R R#((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_popen2.pyttest_os_popen4psN(t__name__t
__module__RR(R)RRR%RRRR$R&R+R-R.R0(((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_popen2.pyR s			
			
	cCstt�dS(N(RR(((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_popen2.pyt	test_main}st__main__(t__doc__twarningstfilterwarningstDeprecationWarningR(tsystunittestRttest.test_supportRRtplatformtSkipTestRtImportErrorRtTestCaseRR3R1(((si/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_popen2.pyt<module>s,&
]