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_termios.cpython-312.pyc

�

'Μg�+���ddlZddlZddlZddlZddlZddlmZed�Zeje	ed�d�Gd�dej��ZGd�d	ej�Ze
d
k(rej�yy)�N)�
import_module�termios�openptyzneed os.openpty()c�x�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zy)�
TestFunctionsc�J�tj�\}|_|jtj|�|jt
|jdd���|_|jtjdd���}|j�|_y)N�wbr)�	buffering)�moder
)�osr�fd�
addCleanup�close�enterContext�open�stream�tempfile�
TemporaryFile�fileno�bad_fd)�self�	master_fd�tmps   �./usr/local/lib/python3.12/test/test_termios.py�setUpzTestFunctions.setUpso���Z�Z�\��	�4�7�������)�,��'�'��T�W�W�d�a�(H�I������� 6� 6�D�A� N�O���j�j�l���c���|jtj�5}||�ddd�|jjj
d|�y#1swY�3xYw)Nr)�assertRaisesr�error�assertEqual�	exception�args)r�errno�callabler"�cms     r�assertRaisesTermiosErrorz&TestFunctions.assertRaisesTermiosErrorsJ��
�
�
�w�}�}�
-���d�O�.�������*�*�1�-�u�5�.�
-�s�A�A!c��tj|j�}|j|t�|jt
|�d�td�D]}|j||t��|\}}}}}}}	|j|	t�|jt
|	�tj�t|	�D]�\}}
|tjzdk(r=|tjk(s|tjk(r|j|
t��Y|j|
t�|jt
|
�d���|jtj|j�|�y)N��r�)r�	tcgetattrr
�assertIsInstance�listr �len�range�int�NCCS�	enumerate�ICANON�VMIN�VTIME�bytesr)r�attrs�i�iflag�oflag�cflag�lflag�ispeed�ospeed�cc�xs           r�test_tcgetattrzTestFunctions.test_tcgetattrs'���!�!�$�'�'�*�����e�T�*�����U��Q�'��q��A��!�!�%��(�C�0��9>�6��u�e�U�F�F�B����b�$�'�����R��'�,�,�/��b�M�D�A�q�����'�A�-��g�l�l�"�a�7�=�=�&8��%�%�a��-��%�%�a��/�� � ��Q���+�
"�	
����*�*�4�;�;�7��?rc��|jtjtj|j
�|j
ttjd�|j
ttjddz�|j
ttjt��|j
ttj�y�N������)r&r#�ENOTTYrr+rr�
ValueError�
OverflowError�	TypeError�object�rs r�test_tcgetattr_errorsz#TestFunctions.test_tcgetattr_errors,s����%�%�e�l�l�G�4E�4E�t�{�{�S����*�g�&7�&7��<����-��):�):�A�t�G�D����)�W�%6�%6���A����)�W�%6�%6�7rc��tj|j�}tj|jtj|�tj|jtj
|�tj|jtj|�tj|jtj|�y�N)rr+r
�	tcsetattr�TCSANOW�	TCSADRAIN�	TCSAFLUSHr)rr7s  r�test_tcsetattrzTestFunctions.test_tcsetattr3s����!�!�$�'�'�*�����$�'�'�7�?�?�E�:����$�'�'�7�#4�#4�e�<����$�'�'�7�#4�#4�e�<����$�+�+�w����>rc
���tj|j�}|jttj
|jtjt|��|jttj
|jtj|dd�|jttj
|jtj|dgz�td�D]�}|dd}ddz||<|jttj
|jtj|�t�||<|jttj
|jtj|���|jttj
|jtj|dd|dddgz�|jttj
|jtj|dd|ddgzgz�tt|d��D�]:}|dd}|ddd|d<ddz|d|<|jttj
|jtj|�t�|d|<|jttj
|jtj|�d|d|<|jttj
|jtj|�d|d|<|jttj
|jtj|���=|jttj
|jtjt��|jttj
|jtj�|jtjtj
|jd|�|jttj
|jddz|�|jttj
|jt�|�|jtjtj
|j tj|�|jt"tj
dtj|�|jttj
ddztj|�|jttj
t�tj|�|jttj
|jtj�y)	NrDrr)rErF�rs)rr+r
rrJrPrQ�tupler/rIrKr.r&r#�EINVALrGrrH)rr7r8�attrs2s    r�test_tcsetattr_errorsz#TestFunctions.test_tcsetattr_errors:s���!�!�$�'�'�*�����)�W�%6�%6�������RW�X]�R^�_����)�W�%6�%6�������RW�X[�Y[�R\�]����)�W�%6�%6�������RW�[\�Z]�R]�^��q��A��1�X�F��4��F�1�I����m�W�->�->�������Z`�a���F�1�I����i��):�):�D�G�G�W�_�_�V\�]��	
���)�W�%6�%6�������RW�X[�Y[�R\�`e�fh�`i�jm�km�`n�_o�Ro�p����)�W�%6�%6�������RW�X[�Y[�R\�`e�fh�`i�mr�ls�`s�_t�Rt�u��s�5��9�~�&�A��1�X�F����A��F�2�J��t�G�F�2�J�q�M����m�W�->�->�������Z`�a�"�H�F�2�J�q�M����i��):�):�D�G�G�W�_�_�V\�]��F�2�J�q�M����i��):�):�D�G�G�W�_�_�V\�]�#�F�2�J�q�M����i��):�):�D�G�G�W�_�_�V\�]�'�	
���)�W�%6�%6�������RX�RZ�[����)�W�%6�%6�������Q��%�%�e�l�l�G�4E�4E�t�w�w�PR�TY�Z����-��):�):�D�G�G�Q��W�e�T����)�W�%6�%6������5�Q��%�%�e�l�l�G�4E�4E�t�{�{�T[�Tc�Tc�ej�k����*�g�&7�&7��W�_�_�e�T����-��):�):�A�t�G�W�_�_�V[�\����)�W�%6�%6���'�/�/�SX�Y����)�W�%6�%6�������Qrc�^�	tj|jd�tj|jd�y#tj$rV}|jdt
jk(r0tjjd�r|jd��d}~wwxYw)Nr*r)�freebsd�netbsdzQtermios.tcsendbreak() is not supported with pseudo-terminals (?) on this platform)r�tcsendbreakr
rr"r#rG�sys�platform�
startswith�skipTestr)r�excs  r�test_tcsendbreakzTestFunctions.test_tcsendbreak]s���	��������+�	���D�K�K��+���}�}�	��x�x��{�e�l�l�*�s�|�|�/F�/F�G\�/]��
�
�K�L���		�s� A�B,�AB'�'B,c��|jttj|jddz�|jt
tj|jd�|jt
tj|jt
��|jtjtj|jd�|jttjdd�|jttjddzd�|jt
tjt
�d�|jt
tj|j�y)NrErFgrrD)rrIrr^r
rJrKr&r#rGrrHrLs r�test_tcsendbreak_errorsz%TestFunctions.test_tcsendbreak_errorsgs������-��)<�)<�d�g�g�q�$�w�O����)�W�%8�%8�$�'�'�3�G����)�W�%8�%8�$�'�'�6�8�L��%�%�e�l�l�G�4G�4G����VW�X����*�g�&9�&9�2�q�A����-��)<�)<�a��g�q�I����)�W�%8�%8�&�(�A�F����)�W�%8�%8�$�'�'�Brc��tj|j�tj|j�yrO)r�tcdrainr
rrLs r�test_tcdrainzTestFunctions.test_tcdrainqs"�������� �������$rc��|jtjtj|j
�|j
ttjd�|j
ttjddz�|j
ttjt��|j
ttj�yrC)r&r#rGrrhrrrHrIrJrKrLs r�test_tcdrain_errorsz!TestFunctions.test_tcdrain_errorsus|���%�%�e�l�l�G�O�O�T�[�[�Q����*�g�o�o�r�:����-����!�T�'�B����)�W�_�_�f�h�?����)�W�_�_�5rc��tj|jtj�tj|jtj�tj|jtj
�yrO)r�tcflushr
�TCIFLUSH�TCOFLUSH�	TCIOFLUSHrLs r�test_tcflushzTestFunctions.test_tcflush|sJ���������!1�!1�2��������!1�!1�2��������!2�!2�3rc��|jtjtj|j
d�|j
ttj|j
ddz�|j
ttj|j
t��|jtjtj|jtj�|j
ttjdtj�|j
ttjddztj�|j
ttjt�tj�|j
ttj|j
�yrC)r&r#rXrrmr
rrIrJrKrGrrnrHrLs r�test_tcflush_errorsz!TestFunctions.test_tcflush_errors�s���%�%�e�l�l�G�O�O�T�W�W�b�Q����-����$�'�'�1�d�7�K����)�W�_�_�d�g�g�v�x�H��%�%�e�l�l�G�O�O�T�[�[�RY�Rb�Rb�c����*�g�o�o�r�7�;K�;K�L����-����!�T�'�7�CS�CS�T����)�W�_�_�f�h��@P�@P�Q����)�W�_�_�d�g�g�>rc�t�tj|jtj�tj|jtj�tj|jtj
�tj|jtj�yrO)r�tcflowr
�TCOOFF�TCOON�TCIOFF�TCIONrLs r�test_tcflowzTestFunctions.test_tcflow�sZ�����t�w�w����/����t�w�w��
�
�.����t�w�w����/����t�w�w��
�
�.rc��|jtjtj|j
d�|j
ttj|j
ddz�|j
ttj|j
t��|jtjtj|jtj�|j
ttjdtj�|j
ttjddztj�|j
ttjt�tj�|j
ttj|j
�yrC)r&r#rXrrur
rrIrJrKrGrrwrHrLs r�test_tcflow_errorsz TestFunctions.test_tcflow_errors�s����%�%�e�l�l�G�N�N�D�G�G�R�P����-�������!�T�'�J����)�W�^�^�T�W�W�f�h�G��%�%�e�l�l�G�N�N�D�K�K�QX�Q^�Q^�_����*�g�n�n�b�'�-�-�H����-�����D��'�-�-�P����)�W�^�^�V�X�w�}�}�M����)�W�^�^�T�W�W�=rc�f�tj|j�}|j|t�|jt
|�d�|j|dt�|j|dt�|jtj|j�|�y)NrErr*)	r�tcgetwinsizer
r,rWr r.r0r�r�sizes  r�test_tcgetwinsizezTestFunctions.test_tcgetwinsize�s����#�#�D�G�G�,�����d�E�*�����T��A�&����d�1�g�s�+����d�1�g�s�+�����-�-�d�k�k�:�D�Arc��|jtjtj|j
�|j
ttjd�|j
ttjddz�|j
ttjt��|j
ttj�yrC)r&r#rGrr~rrrHrIrJrKrLs r�test_tcgetwinsize_errorsz&TestFunctions.test_tcgetwinsize_errors�s����%�%�e�l�l�G�4H�4H�$�+�+�V����*�g�&:�&:�B�?����-��)=�)=�q�$�w�G����)�W�%9�%9�6�8�D����)�W�%9�%9�:rc��tj|j�}tj|j|�tj|jt	|��tj|j
|�yrO)rr~r
�tcsetwinsizer-rrs  r�test_tcsetwinsizezTestFunctions.test_tcsetwinsize�sV���#�#�D�G�G�,�����T�W�W�d�+����T�W�W�d�4�j�1����T�[�[�$�/rc
�"�tj|j�}|jttj
|j|dd�|jttj
|j|dz�|jttj
|jt
��|jttj
|j|dddzf�|jttj
|j|dt|d�f�|jttj
|j|dt
�f�|jttj
|jddz|df�|jttj
|jt|d�|df�|jttj
|jt
�|df�|jtjtj
|j|�|jttj
d|�|jttj
ddz|�|jttj
t
�|�|jttj
|j�y)NrD)rrrErFr*)rr~r
rrJr�rKrI�floatr&r#rGrrHrs  r�test_tcsetwinsize_errorsz&TestFunctions.test_tcsetwinsize_errors�s#���#�#�D�G�G�,�����)�W�%9�%9�4�7�7�D��"�I�N����)�W�%9�%9�4�7�7�D�4�K�P����)�W�%9�%9�4�7�7�F�H�M����-��)=�)=�t�w�w��a��RS�UY�RY�HZ�[����)�W�%9�%9�4�7�7�T�!�W�e�TX�YZ�T[�n�D]�^����)�W�%9�%9�4�7�7�T�!�W�f�h�DW�X����-��)=�)=�t�w�w��D��RV�WX�RY�HZ�[����)�W�%9�%9�4�7�7�U�4�PQ�7�^�UY�Z[�U\�D]�^����)�W�%9�%9�4�7�7�V�X�t�TU�w�DW�X��%�%�e�l�l�G�4H�4H�$�+�+�W[�\����*�g�&:�&:�B��E����-��)=�)=�q�$�w��M����)�W�%9�%9�6�8�T�J����)�W�%9�%9�4�7�7�CrN)�__name__�
__module__�__qualname__rr&rArMrTrZrdrfrirkrqrsrzr|r�r�r�r��rrrrsb��#�6�
@�$8�?�!R�F,�C�%�6�4�
?�/�>�B�;�0�Drrc��eZdZd�Zd�Zy)�
TestModulec���|jtjt�|jtjt�|jtj
t�|jtjt�|jtjt�|jtjt�|jtjt�|jtjt�|jtjt�|jtjt�|jtjt�|jtjt�|jtjt�|jtj t�|jtj"t�|j%tjtj"�|j%tj tj"�yrO)r,r�B0r0�B38400rQrRrSrnrorprvrwrxryr5r4r1�
assertLessrLs r�test_constantszTestModule.test_constants�sd�����g�j�j�#�.����g�n�n�c�2����g�o�o�s�3����g�/�/��5����g�/�/��5����g�.�.��4����g�.�.��4����g�/�/��5����g�n�n�c�2����g�m�m�S�1����g�n�n�c�2����g�m�m�S�1����g�m�m�S�1����g�l�l�C�0����g�l�l�C�0�����
�
�w�|�|�4�������g�l�l�3rc��|jttjt��|jttjt��yrO)�
assertTrue�
issubclassrr�	Exception�assertFalse�OSErrorrLs r�test_exceptionzTestModule.test_exception�s2�����
�7�=�=�)�<�=�����G�M�M�7�;�<rN)r�r�r�r�r�r�rrr�r��s��4�&=rr��__main__)r#rr_r�unittest�test.support.import_helperrr�
skipUnless�hasattr�TestCaserr�r��mainr�rr�<module>r�s����	�
���4�
�	�
"������W�R��+�-@�A�sD�H�%�%�sD�B�sD�l=��"�"�=�2�z���H�M�M�O�r

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