Sindbad~EG File Manager

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

�

)Μg����ddlmZmZejd�ZddlZddlZddlZddlZejejjdud�Gd�dej��Zejee��\ZZejejjdud�Gd�d	��Zejee��\ZZed
k(rej(�yy)�)�abc�utilzimportlib.machineryNzno reasonable builtin modulec�F�eZdZdZd�Zd�Zd�Zd�ZdxZZ	dZ
d�Zd�Zd	�Z
y)
�LoaderTestsz(Test load_module() for built-in modules.c�B�dd|jjd�|_y)N�errno�)�__name__�__package__�
__loader__)�	machinery�BuiltinImporter�verification)�selfs �D/usr/local/lib/python3.12/test/test_importlib/builtin/test_loader.py�setUpzLoaderTests.setUps��)0��+/�>�>�+I�+I�K���c��|j|tj�|jj	�D]!\}}|jt
||�|��#|j|jtj�y)z;Verify that the module matches against what it should have.N)�assertIsInstance�types�
ModuleTyper�items�assertEqual�getattr�assertInr
�sys�modules)r�module�attr�values    r�verifyzLoaderTests.verifysb�����f�e�&6�&6�7��,�,�2�2�4�K�D�%����W�V�T�2�E�:�5��
�
�f�o�o�s�{�{�3rc���tj�5tjdt�|jj
j
|�cddd�S#1swYyxYw)N�ignore)�warnings�catch_warnings�simplefilter�DeprecationWarningr
r�load_module)r�names  rr(zLoaderTests.load_modulesC��
�
$�
$�
&��!�!�(�,>�?��>�>�1�1�=�=�d�C�'�
&�
&�s�?A�A'c��tjtjj�5|j	tjj�}|j|�ddd�y#1swYyxYw�N)r�uncache�BUILTINS�	good_namer(r!)rrs  r�test_modulezLoaderTests.test_modulesJ��
�\�\�$�-�-�1�1�
2��%�%�d�m�m�&=�&=�>�F��K�K���3�
2�
2�s�;A2�2A;Nc�P�tjtjj�5|j	tjj�}|j	tjj�}|j||�ddd�y#1swYyxYwr+)rr,r-r.r(�assertIs)r�module1�module2s   r�test_module_reusezLoaderTests.test_module_reuse+sf��
�\�\�$�-�-�1�1�
2��&�&�t�}�}�'>�'>�?�G��&�&�t�}�}�'>�'>�?�G��M�M�'�7�+�3�
2�
2�s�A%B�B%c���d}|tjvsJ�|jt�5}|j	|�ddd�|jjj|�y#1swY�0xYw)N�	dssdsdfff)r�builtin_module_names�assertRaises�ImportErrorr(r�	exceptionr))rr)�cms   r�test_unloadablezLoaderTests.test_unloadable2sa�����3�3�3�3�3�3�
�
�
�{�
+�r����T�"�,�������*�*�D�1�,�
+�s�A-�-A6c��d}|tjvsJ�tj|�5t	j
|�}|tj|<ddd�|jt�5}|j|�ddd�|jjj|�y#1swY�_xYw#1swY�<xYw)N�builtin_reload_test)
rr7rr,rrrr8r9r(rr:r))r�module_namerr;s    r�test_already_importedz!LoaderTests.test_already_imported9s���,���#�":�":�:�:�:�
�\�\�+�
&��%�%�k�2�F�'-�C�K�K��$�'��
�
�{�
+�r����[�)�,�������*�*�K�8�'�
&��,�
+�s�)B3�2B?�3B<�?C)r
�
__module__�__qualname__�__doc__rr!r(r/�test_package�test_lacking_parent�test_state_after_failurer4r<r@�rrrr
sA��3�K�4�D�
 �*.�-�L�&� $��,�2�
9rr)r
c��eZdZdZd�Zd�Zd�Zeje	jjdud�d��Zy)�InspectLoaderTestsz4Tests for InspectLoader methods for BuiltinImporter.c��|jjjtjj
�}|j
|�yr+)r
r�get_coderr-r.�assertIsNone�r�results  r�
test_get_codez InspectLoaderTests.test_get_codePs4�����/�/�8�8����9P�9P�Q�����&�!rc��|jjjtjj
�}|j
|�yr+)r
r�
get_sourcerr-r.rLrMs  r�test_get_sourcez"InspectLoaderTests.test_get_sourceUs4�����/�/�:�:�4�=�=�;R�;R�S�����&�!rc��|jjjtjj
�}|j
|�yr+)r
r�
is_packagerr-r.�assertFalserMs  r�test_is_packagez"InspectLoaderTests.test_is_packageZs4�����/�/�:�:�4�=�=�;R�;R�S������ rNzall modules are built inc���dD]"}t|jj|�}�$|jt�5}t
jj�ddd�y#1swYyxYw)N)rKrQrT)rr
rr8r9rr-�bad_name)r�	meth_name�methodr;s    r�test_not_builtinz#InspectLoaderTests.test_not_builtin_sT��B�I��T�^�^�;�;�Y�G�F�B�
�
�
�{�
+�r��4�=�=�)�)�*�,�
+�
+�s�!A'�'A0)
r
rArBrCrOrRrV�unittest�skipIfrr-rXr[rGrrrIrIKsH��?�"�
"�
!�
�X�_�_�T�]�]�+�+�t�3�5O�P�+�Q�+rrI�__main__)�test.test_importlibrr�import_importlibr
rrr\r$r]r-r.r�	test_both�Frozen_LoaderTests�Source_LoaderTestsrI�Frozen_InspectLoaderTests�Source_InspectLoaderTestsr
�mainrGrr�<module>rgs���)�!�D�!�!�"7�8�	�
�����������(�(�D�0�2P�Q�89�#�/�/�89�R�89�z�T�^�^�K�9�5�����������(�(�D�0�2P�Q�+�+�R�+�<�T�^�^�&�)�<�����z���H�M�M�O�r

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