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

�

)ΜgD��T�ddlZddlZddlmZddlmZddlmZGd�dejej�ZGd�d	�Z	Gd
�de	ej�Z
Gd�d
e	ej�ZGd�de	ejej�Z
edk(rej�yy)�N)�	resources�)�data01)�utilc��eZdZd�Zy)�CommonTestsc��tjtj|�j|��5	ddd�y#1swYyxYw)N)r�as_file�files�joinpath)�self�package�paths   �D/usr/local/lib/python3.12/test/test_importlib/resources/test_path.py�executezCommonTests.execute
s4��
�
�
�y���w�7�@�@��F�
G��H�
G�
G�s�A�AN)�__name__�
__module__�__qualname__r��rrr	s��rrc��eZdZd�Zy)�	PathTestsc��tj|j�dz}tj|�5}|j	|j
j
d�t|��|jdd��5}|j�}ddd�|jd�ddd�y#1swY�$xYw#1swYyxYw)z�
        Path should be readable.

        Test also implicitly verifies the returned object is a pathlib.Path
        instance.
        �
utf-8.file�rzutf-8)�encodingNzHello, UTF-8 world!
)rr�datar
�
assertTrue�name�endswith�repr�open�read�assertEqual)r
�targetr�file�texts     r�test_readingzPathTests.test_readings���������+�l�:��
�
�
�v�
&�$��O�O�D�I�I�.�.�|�<�d�4�j�I����3���1�T��y�y�{��2����4�d�;�'�
&�2�1��'�
&�s$�AC�B4�C�4B=	�9C�C	N)rrrr(rrrrrs��
<rrc��eZdZeZd�Zy)�
PathDiskTestsc��tj|j�dz}tj|�5}dt	|�vsJ�	ddd�y#1swYyxYw)Nrr)rrrr
�str�r
r%rs   r�test_natural_pathzPathDiskTests.test_natural_path#sI��������+�l�:��
�
�
�v�
&�$��S��Y�&�&�&�'�
&�
&�s�A�AN)rrrrrr.rrrr*r* s���D�'rr*c��eZdZd�Zy)�PathMemoryTestsc��tjd�}|j|j�t	j
|t
d���|_d|jj_	d|jj_
y)NsHello, UTF-8 world!
zpackage exists only in memory)r&rF)�io�BytesIO�
addCleanup�closer�create_package�FileNotFoundErrorr�__spec__�origin�has_location)r
r&s  r�setUpzPathMemoryTests.setUp-se���z�z�2�3������
�
�#��'�'��-�.M�N�
��	�%)��	�	���!�*/��	�	���'rN)rrrr;rrrr0r0,s��0rr0c��eZdZd�Zy)�PathZipTestsc��tj|j�dz}tj|�5}|j	�ddd�y#1swYyxYw)z�
        It is not an error if the file that was temporarily stashed on the
        file system is removed inside the `with` stanza.
        rN)rrrr
�unlinkr-s   r�test_remove_in_context_managerz+PathZipTests.test_remove_in_context_manager8s@��
������+�l�:��
�
�
�v�
&�$��K�K�M�'�
&�
&�s�A�AN)rrrr@rrrr=r=7s��rr=�__main__)r2�unittest�	importlibr�rrr�TestCaserr*r0�ZipSetupr=r�mainrrr�<module>rHs���	������$�"�"�H�$5�$5��<�<�"	'�I�x�0�0�	'�0�i��!2�!2�0��9�d�m�m�X�->�->���z���H�M�M�O�r

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