HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/test/test_importlib/__pycache__/test_compatibilty_files.cpython-311.pyc
�

��Vc#
���ddlZddlZddlmZddlmZmZddlmZGd�dej��Z	Gd�d	ej��Z
dS)
�N)�	resources)�CompatibilityFiles�	wrap_spec�)�utilc��eZdZed���Zed���Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zd�ZdS)�CompatibilityFilesTestsc�X�tjd��}tj|dd���S)N�
Hello, world!�	some_path��a�b�c)�file�path�contents)�io�BytesIOr�create_package)�self�
bytes_datas  �?D:\Python311\Lib\test\test_importlib\test_compatibilty_files.py�packagezCompatibilityFilesTests.packages5���Z� 0�1�1�
��"���$�
�
�
�	
�c�4�tj|j��S�N�r�filesr�rs rrzCompatibilityFilesTests.files�����t�|�,�,�,rc��|�td�|j���D����gd���dS)Nc3�$K�|]}|jV��dSr)�name)�.0rs  r�	<genexpr>z>CompatibilityFilesTests.test_spec_path_iter.<locals>.<genexpr>s$����>�>��4�9�>�>�>�>�>�>rr
)�assertEqual�sortedr�iterdirr s r�test_spec_path_iterz+CompatibilityFilesTests.test_spec_path_itersS������>�>���);�);�)=�)=�>�>�>�>�>��O�O�	
�	
�	
�	
�	
rc��|�t|jdz�����g��dS�Nr�r'�listrr)r s r�test_child_path_iterz,CompatibilityFilesTests.test_child_path_iter"s9������t�z�C�/�8�8�:�:�;�;�R�@�@�@�@�@rc��|�t|jdzdz�����g��|�t|jdzdzdz�����g��dSr,r-r s r�test_orphan_path_iterz-CompatibilityFilesTests.test_orphan_path_iter%sy������t�z�C�/�#�5�>�>�@�@�A�A�2�F�F�F�����t�z�C�/�#�5��;�D�D�F�F�G�G��L�L�L�L�Lrc��|�|j�����|�|j�����dSr��assertFalser�is_file�is_dirr s r�test_spec_path_isz)CompatibilityFilesTests.test_spec_path_is)sL�������+�+�-�-�.�.�.������*�*�,�,�-�-�-�-�-rc���|�|jdz�����|�|jdz�����dSr,)�
assertTruerr5r4r6r s r�test_child_path_isz*CompatibilityFilesTests.test_child_path_is-sT�������c�)�2�2�4�4�5�5�5����$�*�s�*�2�2�4�4�5�5�5�5�5rc��|�|jdzdz�����|�|jdzdz�����|�|jdzdzdz�����|�|jdzdzdz�����dSr,r3r s r�test_orphan_path_isz+CompatibilityFilesTests.test_orphan_path_is1s������$�*�s�*�S�0�9�9�;�;�<�<�<����$�*�s�*�S�0�8�8�:�:�;�;�;����$�*�s�*�S�0�3�6�?�?�A�A�B�B�B����$�*�s�*�S�0�3�6�>�>�@�@�A�A�A�A�Arc�F�|�|jjd��dS)N�testingpackage�r'rr$r s r�test_spec_path_namez+CompatibilityFilesTests.test_spec_path_name7s#��������*:�;�;�;�;�;rc�L�|�|jdzjd��dSr,r?r s r�test_child_path_namez,CompatibilityFilesTests.test_child_path_name:s(�����$�*�s�*�0�#�6�6�6�6�6rc��|�|jdzdzjd��|�|jdzdzdzjd��dS�Nrrrr?r s r�test_orphan_path_namez-CompatibilityFilesTests.test_orphan_path_name=sW�����$�*�s�*�S�0�6��<�<�<����$�*�s�*�S�0�3�6�<�c�B�B�B�B�Brc��|�|j���d��|�|j���d��dS)Nr�
Hello, world!�r'r�
read_bytes�	read_textr s r�test_spec_path_openz+CompatibilityFilesTests.test_spec_path_openAsQ�������.�.�0�0�2B�C�C�C������-�-�/�/��A�A�A�A�Arc���|�|jdz���d��|�|jdz���d��dS)NrrrGrHr s r�test_child_path_openz,CompatibilityFilesTests.test_child_path_openEs[�����$�*�s�*�6�6�8�8�:J�K�K�K����$�*�s�*�5�5�7�7��I�I�I�I�Irc�R�|�t��5|jdzdz���ddd��n#1swxYwY|�t��5|jdzdzdz���ddd��dS#1swxYwYdSrD)�assertRaises�FileNotFoundErrorrrIr s r�test_orphan_path_openz-CompatibilityFilesTests.test_orphan_path_openIs&��
�
�
�0�
1�
1�	2�	2�
�Z�#�
��
#�/�/�1�1�1�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2����	2�	2�	2�	2�
�
�
�0�
1�
1�	8�	8�
�Z�#�
��
#�c�
)�5�5�7�7�7�	8�	8�	8�	8�	8�	8�	8�	8�	8�	8�	8�	8����	8�	8�	8�	8�	8�	8s#� A�A�A�,#B�B �#B c��|�t��5|j�d��ddd��dS#1swxYwYdS)N�0)rO�
ValueErrorr�openr s r�test_open_invalid_modez.CompatibilityFilesTests.test_open_invalid_modeOs���
�
�
�z�
*�
*�	!�	!��J�O�O�C� � � �	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!�	!�	!s�A�A�
Ac��|�t��5tj��ddd��dS#1swxYwYdSr)rOrTr�
OrphanPathr s r�test_orphan_path_invalidz0CompatibilityFilesTests.test_orphan_path_invalidSs���
�
�
�z�
*�
*�	,�	,��)�+�+�+�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,����	,�	,�	,�	,�	,�	,s�<�A�Ac��t|j��}|�|j�d��t
��dSr)rr�assertIsInstance�loader�get_resource_readerr)r�specs  r�test_wrap_specz&CompatibilityFilesTests.test_wrap_specWs>�����&�&�����d�k�=�=�d�C�C�EW�X�X�X�X�XrN)�__name__�
__module__�__qualname__�propertyrrr*r/r1r7r:r<r@rBrErKrMrQrVrYr_�rrr	r	s@������
�
�
��X�
��-�-��X�-�
�
�
�A�A�A�M�M�M�.�.�.�6�6�6�B�B�B�<�<�<�7�7�7�C�C�C�B�B�B�J�J�J�8�8�8�!�!�!�,�,�,�Y�Y�Y�Y�Yrr	c�@�eZdZed���Zed���Zd�ZdS)�CompatibilityFilesNoReaderTestsc�*�tjd��Sr)r�create_package_from_loaderr s rrz'CompatibilityFilesNoReaderTests.package]s���.�t�4�4�4rc�4�tj|j��Srrr s rrz%CompatibilityFilesNoReaderTests.filesar!rc�V�|�|jdztj��dSr,)r[rrrXr s r�test_spec_path_joinpathz7CompatibilityFilesNoReaderTests.test_spec_path_joinpathes)�����d�j�3�.�0B�0M�N�N�N�N�NrN)r`rarbrcrrrkrdrrrfrf\s\������
�5�5��X�5��-�-��X�-�O�O�O�O�Orrf)r�unittest�	importlibr�importlib.resources._adaptersrrr�TestCaser	rfrdrr�<module>rps���	�	�	�	�������������������
������KY�KY�KY�KY�KY�h�/�KY�KY�KY�\
O�
O�
O�
O�
O�h�&7�
O�
O�
O�
O�
Or