Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/test/test_importlib/resources/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/test/test_importlib/resources/__pycache__/test_open.cpython-312.pyc

�

)Μgg
���ddlZddlmZddlmZddlmZGd�dejej�ZGd�d	ejej�Z	Gd
�d�Z
Gd�d
e
ej�ZGd�de
ej�ZGd�de
ejej�Zedk(rej �yy)�N)�	resources�)�data01)�utilc��eZdZd�Zy)�CommonBinaryTestsc��tj|�j|�}|jd�5	ddd�y#1swYyxYw)N�rb�r�files�joinpath�open��self�package�path�targets    �D/usr/local/lib/python3.12/test/test_importlib/resources/test_open.py�executezCommonBinaryTests.execute	s6������)�2�2�4�8��
�[�[��
���
�
�s�A�A
N��__name__�
__module__�__qualname__r��rrr���rrc��eZdZd�Zy)�CommonTextTestsc��tj|�j|�}|jd��5	ddd�y#1swYyxYw)N�utf-8��encodingrrs    rrzCommonTextTests.executes8������)�2�2�4�8��
�[�[�'�[�
*��+�
*�
*�s�A�ANrrrrrrrrrc�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�	OpenTestsc���tj|j�dz}|jd�5}|j	�}|j|d�ddd�y#1swYyxYw)Nzbinary.filer
s�rr�datar�read�assertEqual�rr�fp�results    r�test_open_binaryzOpenTests.test_open_binarysO��������+�m�;��
�[�[��
�"��W�W�Y�F����V�%8�9��
�
�s�#A � A)c���tj|j�dz}|jd��5}|j	�}|j|d�ddd�y#1swYyxYw)Nz
utf-8.filer r!zHello, UTF-8 world!
r&r*s    r�test_open_text_default_encodingz)OpenTests.test_open_text_default_encodingsQ��������+�l�:��
�[�[�'�[�
*�b��W�W�Y�F����V�%<�=�+�
*�
*�s�#A!�!A*c���tj|j�dz}|jdd��5}|j	�}ddd�|jd�y#1swY�xYw)N�utf-16.filezutf-16�strict�r"�errorszHello, UTF-16 world!
r&r*s    r�test_open_text_given_encodingz'OpenTests.test_open_text_given_encoding#sU��������+�m�;��
�[�[�(�8�[�
<���W�W�Y�F�=�����!9�:�=�
<�s�A"�"A+c�l�tj|j�dz}|jdd��5}|j	t
|j�ddd�|jdd��5}|j
�}ddd�|jd�y#1swY�HxYw#1swY�(xYw)zD
        Raises UnicodeError without the 'errors' argument.
        r1r r2r3N�ignorez*Hello, UTF-16 world!
)rrr'r�assertRaises�UnicodeErrorr(r)r*s    r�test_open_text_with_errorsz$OpenTests.test_open_text_with_errors)s���������+�m�;��
�[�[�'�(�[�
;�r����l�B�G�G�4�<�
�[�[�'�(�[�
;�r��W�W�Y�F�<�����
7�	
�	<�
;��
;�
;�s�!B�2B*�B'�*B3c��tj|j�dz}|jt�5|jd�ddd�y#1swYyxYw)N�does-not-existr
�rrr'r8�FileNotFoundErrorr�rrs  r�"test_open_binary_FileNotFoundErrorz,OpenTests.test_open_binary_FileNotFoundError9sA��������+�.>�>��
�
�
�0�
1��K�K���2�
1�
1�s�A�Ac��tj|j�dz}|jt�5|jd��ddd�y#1swYyxYw)Nr<r r!r=r?s  r� test_open_text_FileNotFoundErrorz*OpenTests.test_open_text_FileNotFoundError>sC��������+�.>�>��
�
�
�0�
1��K�K��K�)�2�
1�
1�s�A�AN)	rrrr-r/r5r:r@rBrrrr$r$s ��:�>�;�
� �
*rr$c��eZdZd�Zy)�
OpenDiskTestsc��t|_y)N)rr')rs r�setUpzOpenDiskTests.setUpEs	����	rN�rrrrFrrrrDrDDs��rrDc��eZdZd�Zy)�OpenDiskNamespaceTestsc��ddlm}||_y)Nr)�namespacedata01)�rKr')rrKs  rrFzOpenDiskNamespaceTests.setUpJs��%�#��	rNrGrrrrIrIIs��$rrIc��eZdZy)�OpenZipTestsN)rrrrrrrNrNPs��rrN�__main__)�unittest�	importlibrrLrr�CommonTests�TestCaserrr$rDrI�ZipSetuprNr�mainrrr�<module>rVs���������(�(�(�*;�*;���d�&�&��(9�(9��+*�+*�\�I�x�0�0��
$�Y��(9�(9�$�	�9�d�m�m�X�->�->�	��z���H�M�M�O�r

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