Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/test_pipes.cpython-312.pyc

�

'Μg&���ddlZddlZddlZddlZddlmZmZddlmZm	Z	ddl
mZed�Zejdk7rejd��erejj!e�sejd��ed	zZd
ej$�dej&��ZGd�d
ej*�Zd�Zedk(rej2�yy)�N)�
reap_children�
unix_shell)�TESTFN�unlink)�import_deprecated�pipes�posixz pipes module only works on posixzpipes module requires a shell�2ztr � c�f�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zy)�SimplePipeTestsc�<�ttfD]
}t|��y�N)r�TESTFN2r)�self�fs  �,/usr/local/lib/python3.12/test/test_pipes.py�tearDownzSimplePipeTests.tearDowns���'�"�A��1�I�#�c��tjd��|jd�tj	�}|jttj�|jtd�5}|jd�ddd�tt�5}|j|j�d�ddd�y#1swY�BxYw#1swYyxYw)N�tr�tr is not available�wzhello world #1zHELLO WORLD #1)
�shutil�which�skipTestr�Template�append�	s_command�STDIN_STDOUT�openr�write�assertEqual�read)r�trs   r�testSimplePipe1zSimplePipeTests.testSimplePipe1s����<�<���%��M�M�/�0��N�N���	����E�.�.�/�
�V�V�F�C�
 �A�
�G�G�$�%�!�
�&�\�Q����Q�V�V�X�'7�8��\�!�
 ��
�\�s�5C�!C�C�Cc���tjd��|jd�ttd�5}|jd�ddd�tj�}|jtdztj�|jtt�tt�5}|j|j�d�ddd�y#1swY��xYw#1swYyxYw)Nrrr�hello world #2z
 < $IN > $OUT�HELLO WORLD #2)rrrr!rr"rrrr�FILEIN_FILEOUT�copyrr#r$�rrr%s   r�testSimplePipe2zSimplePipeTests.testSimplePipe2&s����<�<���%��M�M�/�0�
�&�#�
�!�
�G�G�$�%���N�N���	����_�,�e�.B�.B�C�	���v�w��
�'�]�a����Q�V�V�X�'7�8��]��
��
�]�s�C�5!C+�C(�+C4c���tjd��|jd�ttd�5}|jd�ddd�tj�}|jtdztj�|jtd�}	|j|j�d�|j�y#1swY��xYw#|j�wxYw)Nrrrr(z < $IN�rr))rrrr!rr"rrrr�
FILEIN_STDOUTr#r$�closer,s   r�testSimplePipe3zSimplePipeTests.testSimplePipe31s����<�<���%��M�M�/�0�
�&�#�
�!�
�G�G�$�%���N�N���	����X�%�u�':�':�;�
�F�F�6�3���	����Q�V�V�X�'7�8�
�G�G�I��
��
�G�G�I�s�C�# C �C� C2c���d}ttd�5}|j|�ddd�ttd�5}|jd�ddd�tj�}|j
tt�tt�5}|j|j�|�ddd�y#1swY��xYw#1swY�|xYw#1swYyxYw)Nzempty pipeline test COPYr�)	r!rr"rrrr+r#r$�r�drr%s    r�testEmptyPipeline1z"SimplePipeTests.testEmptyPipeline1>s���&��
�&�#�
�!�
�G�G�A�J��
�'�3�
�1�
�G�G�B�K� �
�.�.�
��	���v�w��
�'�]�a����Q�V�V�X�q�)��]�
�
��
�
���]�s"�B>�C
�!C�>C�
C�Cc�T�d}ttd�5}|j|�ddd�tj	�}|jtd�}	|j|j
�|�|j�y#1swY�exYw#|j�wxYw)Nzempty pipeline test READrr/)r!rr"rrr#r$r1r5s    r�testEmptyPipeline2z"SimplePipeTests.testEmptyPipeline2Jsx��&��
�&�#�
�!�
�G�G�A�J��
�.�.�
��
�F�F�6�3���	����Q�V�V�X�q�)�
�G�G�I��
��
�G�G�I�s�B	� B�	B�B'c�0�d}tj�}|jtd�5}|j	|�ddd�tt�5}|j|j
�|�ddd�y#1swY�BxYw#1swYyxYw)Nzempty pipeline test WRITEr)rrr!rr"r#r$)rr6r%rs    r�testEmptyPipeline3z"SimplePipeTests.testEmptyPipeline3Vsh��'���N�N���
�V�V�F�C�
 �A�
�G�G�A�J�!�
�&�\�Q����Q�V�V�X�q�)��\�!�
 ��
�\�s�B�!B�B	�Bc���tj�}|jt|�d�|j	dtj
�|jt|�d�y)Nz<Template instance, steps=[]>�
tr a-z A-Zz1<Template instance, steps=[('tr a-z A-Z', '--')]>)rrr#�reprrr �rr%s  r�testReprzSimplePipeTests.testRepr_sO���N�N�������a��"A�B�	����u�1�1�2�����a��G�	Irc���tj�}|jd�|j|jd�|jd�|j|jd�y)NFT)rr�debugr#�	debuggingr?s  r�testSetDebugzSimplePipeTests.testSetDebugfsL���N�N���	�����������e�,�	����
�������d�+rc��tj�}|jdtj�|j	t
|jdd�y)N�boguscmd�	bogusfiler/)rrr�SINK�assertRaises�
ValueErrorr!r?s  r�testReadOpenSinkz SimplePipeTests.testReadOpenSinkms:��
�N�N���	����U�Z�Z�(����*�a�f�f�k�3�?rc��tj�}|jdtj�|j	t
|jdd�y)NrFrGr)rr�prepend�SOURCErIrJr!r?s  r�testWriteOpenSourcez#SimplePipeTests.testWriteOpenSourcets:��
�N�N���	�	�	�*�e�l�l�+����*�a�f�f�k�3�?rc��tj�}|jt|jdtj
�|jt|jdd�|jt|jdtj�tj�}|j	dtj�|jt|jdtj�tj�}|jt|jdtj�tj�}|jt|jdtj�tj�}|jt|jdtj�tj�}|jt|jdtj�y)N�rF�xx�
boguscmd $OUT�boguscmd $IN)rrrI�	TypeErrorrr rJrNrHr*r0�
STDIN_FILEOUTr?s  r�testBadAppendOptionsz$SimplePipeTests.testBadAppendOptions{sZ���N�N���	
���)�Q�X�X�q�%�2D�2D�E�	
���*�a�h�h�
�D�A�	
���*�a�h�h�
�E�L�L�I�
�N�N���	����U�Z�Z�(����*�a�h�h�
�E�J�J�G�
�N�N������*�a�h�h�� �/�/�	1��N�N������*�a�h�h�
� �.�.�	0�
�N�N������*�a�h�h�� �/�/�	1��N�N������*�a�h�h�
� �.�.�	0rc��tj�}|jt|jdtj
�|jt|jdd�|jt|jdtj�tj�}|j	dtj�|jt|jdtj�tj�}|jt|jdtj�tj�}|jt|jdtj�tj�}|jt|jdtj�tj�}|jt|jdtj�y)NrQr=rRrFrSrT)rrrIrUrMr rJrHrNr*r0rVr?s  r�testBadPrependOptionsz%SimplePipeTests.testBadPrependOptions�sZ���N�N���	
���)�Q�Y�Y��5�3E�3E�F�	
���*�a�i�i��t�D�	
���*�a�i�i��U�Z�Z�H�
�N�N���	�	�	�*�e�l�l�+����*�a�i�i��U�\�\�J�
�N�N������*�a�i�i�� �/�/�	1��N�N������*�a�i�i�� �.�.�	0�
�N�N������*�a�i�i�� �/�/�	1��N�N������*�a�i�i�� �.�.�	0rc�p�tj�}|jt|jdd�y)NrG�x)rrrIrJr!r?s  r�testBadOpenModezSimplePipeTests.testBadOpenMode�s&���N�N������*�a�f�f�k�3�?rc���tj�}|jdtj�|j	�}|jt
|�t
|��|j|j|j�|jt
|j�t
|j��|j|j|j�y)Nr=)
rrrr �clone�assertNotEqual�idr#�stepsrC)rr%�us   r�	testClonezSimplePipeTests.testClone�s����N�N���	����u�1�1�2�
�G�G�I�����B�q�E�2�a�5�)�������!�'�'�*����B�q�w�w�K��A�G�G��5�������a�k�k�2rN)�__name__�
__module__�__qualname__rr&r-r2r7r9r;r@rDrKrOrWrYr\rc�rrr
r
sS���9�	9��
*�
�*�I�,�@�@�0�D0�B@�3rr
c��t�yr)rrgrr�tearDownModuleri�s���Or�__main__)�os�string�unittestr�test.supportrr�test.support.os_helperrr�test.support.warnings_helperrr�name�SkipTest�path�existsr�ascii_lowercase�ascii_uppercaser�TestCaser
rird�mainrgrr�<module>rys���	�
��
�2�1�:��'�"���7�7�g��
�(�
�
�>�
?�?��r�w�w�~�~�j�1�
�(�
�
�;�
<�<�
�3�,��!�0�0�&�2H�2H�I�	�s3�h�'�'�s3�l��z���H�M�M�O�r

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