Sindbad~EG File Manager
�
)Μg� ���ddlZddlmZmZddlmZddlmZGd�dejej�Z Gd�d ejej�Z
Gd
�d�ZGd�d
eej�ZGd�deejej�ZGd�deej�Zedk(rej"�yy)�N)�
import_module� resources�)�data01)�utilc��eZdZd�Zy)�CommonBinaryTestsc�h�tj|�j|�j�y)N)r�files�joinpath�
read_bytes��self�package�paths �D/usr/local/lib/python3.12/test/test_importlib/resources/test_read.py�executezCommonBinaryTests.execute s"������ �)�)�$�/�:�:�<�N��__name__�
__module__�__qualname__r�rrr r s��=rr c��eZdZd�Zy)�CommonTextTestsc�l�tj|�j|�jd��y)N�utf-8��encoding)rrr� read_textrs rrzCommonTextTests.executes'������ �)�)�$�/�9�9�7�9�KrNrrrrrr
s��Lrrc�$�eZdZd�Zd�Zd�Zd�Zy)� ReadTestsc��tj|j�jd�j �}|j|d�y)N�binary.file�)rr�datarr
�assertEqual�r�results r�test_read_byteszReadTests.test_read_bytess8��������+�4�4�]�C�N�N�P�������-rc��tj|j�jd�j d��}|j|d�y)Nz
utf-8.filerrzHello, UTF-8 world!
�rrr&rr r'r(s r�test_read_text_default_encodingz)ReadTests.test_read_text_default_encodings@���O�O�D�I�I�&�
�X�l�
#�
�Y��Y�
(� �
����!8�9rc��tj|j�jd�j d��}|j|d�y)N�utf-16.filezutf-16rzHello, UTF-16 world!
r,r(s r�test_read_text_given_encodingz'ReadTests.test_read_text_given_encodings@���O�O�D�I�I�&�
�X�m�
$�
�Y��Y�
)� �
����!9�:rc���tj|j�dz}|jt|j
d��|jdd��}|j
|d�y)zD
Raises UnicodeError without the 'errors' argument.
r/rr�ignore)r�errorsz*Hello, UTF-16 world!
N)rrr&�assertRaises�UnicodeErrorr r')r�targetr)s r�test_read_text_with_errorsz$ReadTests.test_read_text_with_errors'sa��������+�m�;�����,��(8�(8�7��K��!�!�7�8�!�D������
7�
rN)rrrr*r-r0r7rrrr"r"s��.�:�;�
rr"c��eZdZeZy)�
ReadDiskTestsN)rrrrr&rrrr9r96s���Drr9c��eZdZd�Zd�Zy)�ReadZipTestsc��td�}tj|�jd�j �}|j|d�y�Nzziptestdata.subdirectoryr$r%)rrrrr
r')r� submoduler)s r�test_read_submodule_resourcez)ReadZipTests.test_read_submodule_resource;s?��!�"<�=� �����+�4�4�]�C�N�N�P�������-rc��tjd�jd�j�}|j |d�yr=)rrrr
r'r(s r�$test_read_submodule_resource_by_namez1ReadZipTests.test_read_submodule_resource_by_name@s7���O�O�6�7�
�X�m�
$�
�Z�\� �
�����-rN)rrrr?rArrrr;r;:s��.�
.rr;c��eZdZd�Zy)�ReadNamespaceTestsc��ddlm}||_y)Nr)�namespacedata01)�rEr&)rrEs r�setUpzReadNamespaceTests.setUpJs��%�#�� rN)rrrrGrrrrCrCIs��$rrC�__main__)�unittest� importlibrrrFrr�CommonTests�TestCaser rr"r9�ZipSetupr;rCr�mainrrr�<module>rOs����.���=��(�(�(�*;�*;�=�
L�d�&�&��(9�(9�L�
!
�!
�H�I�x�0�0��.�9�d�m�m�X�->�->�.�$��H�$5�$5�$��z���H�M�M�O�r
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists