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

�

)Μgs���ddlZddlZddlZddlmZddlmZddlmZm	Z	ddl
mZGd�d�ZGd	�d
e�Z
Gd�dej�Zy)
�N)�	os_helper)�	resources)�TraversableResources�ResourceReader�)�utilc�"�eZdZdZdefd�Zd�Zy)�SimpleLoaderzA
    A simple loader that only implements a resource reader.
    �readerc��||_y�N�r)�selfrs  �F/usr/local/lib/python3.12/test/test_importlib/resources/test_custom.py�__init__zSimpleLoader.__init__s	�����c��|jSr
r)r�packages  r�get_resource_readerz SimpleLoader.get_resource_readers���{�{�rN)�__name__�
__module__�__qualname__�__doc__rrr�rrr
r
s����~��rr
c�6�eZdZdZdej
fd�Zd�Zy)�MagicResourcesz2
    Magically returns the resources at path.
    �pathc��||_yr
�r)rrs  rrzMagicResources.__init__s	����	rc��|jSr
r�rs r�fileszMagicResources.files s���y�y�rN)rrrr�pathlib�Pathrr"rrrrrs����W�\�\��rrc��eZdZd�Zd�Zy)�CustomTraversableResourcesTestsc��tj�|_|j|jj�yr
)�
contextlib�	ExitStack�fixtures�
addCleanup�closer!s r�setUpz%CustomTraversableResourcesTests.setUp%s(��"�,�,�.��
�����
�
�+�+�,rc���|jjtj��}t	t|��}t
j|�}tj|�}||usJ�yr
)
r*�
enter_contextr�temp_dirr
rr�create_package_from_loaderrr")rr0�loader�pkgr"s     r�test_custom_loaderz2CustomTraversableResourcesTests.test_custom_loader)sZ���=�=�.�.�y�/A�/A�/C�D���n�X�6�7���-�-�f�5������$���� � � rN)rrrr-r4rrrr&r&$s��-�!rr&)�unittestr(r#�test.supportr�	importlibr�importlib.resources.abcrr�rr
r�TestCaser&rrr�<module>r;sC�����"��H��	�	�	�)�	�
!�h�&7�&7�
!r

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