HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/test/test_importlib/builtin/__pycache__/test_loader.cpython-37.opt-2.pyc
B

��g��@s�ddlmZddlmZe�d�ZddlZddlZddlZe�ej	j
dkd�Gdd�dej��Zejeed	�\Z
Ze�ej	j
dkd�Gd
d�d��Zejeed	�\ZZedkr�e��dS)
�)�abc)�utilzimportlib.machinery�Nzno reasonable builtin modulec@sPeZdZdd�Zdd�Zdd�Zdd�Zd	ZZd	Z	d
d�Z
dd
�Zdd�Zd	S)�LoaderTestscCsdd|jjd�|_dS)N�errno�)�__name__�__package__�
__loader__)�	machinery�BuiltinImporter�verification)�self�r�C/usr/local/lib/python3.7/test/test_importlib/builtin/test_loader.py�setUpszLoaderTests.setUpcCsL|�|tj�x(|j��D]\}}|�t||�|�qW|�|jt	j
�dS)N)ZassertIsInstance�types�
ModuleTyper
�items�assertEqual�getattrZassertInr�sys�modules)r�module�attr�valuerrr�verifyszLoaderTests.verifycCs|jj�|�S)N)rr�load_module)r�namerrrrszLoaderTests.load_modulec	Cs6t�tjj��|�tjj�}|�|�WdQRXdS)N)r�uncache�BUILTINS�	good_namerr)rrrrr�test_moduleszLoaderTests.test_moduleNc	CsFt�tjj��.|�tjj�}|�tjj�}|�||�WdQRXdS)N)rrr r!rZassertIs)rZmodule1Zmodule2rrr�test_module_reuse)szLoaderTests.test_module_reusec	Cs8d}|�t��}|�|�WdQRX|�|jj|�dS)NZ	dssdsdfff)�assertRaises�ImportErrorrr�	exceptionr)rr�cmrrr�test_unloadable0szLoaderTests.test_unloadablec	Csbd}t�|��t�|�}|tj|<WdQRX|�t��}|�|�WdQRX|�	|j
j|�dS)NZbuiltin_reload_test)rrrrrrr$r%rrr&r)rZmodule_namerr'rrr�test_already_imported7s
z!LoaderTests.test_already_imported)
r�
__module__�__qualname__rrrr"Ztest_packageZtest_lacking_parentZtest_state_after_failurer#r(r)rrrrr
sr)rc@s@eZdZdd�Zdd�Zdd�Ze�ej	j
dkd�d	d
��ZdS)�InspectLoaderTestscCs |jj�tjj�}|�|�dS)N)rr�get_coderr r!�assertIsNone)r�resultrrr�
test_get_codeNsz InspectLoaderTests.test_get_codecCs |jj�tjj�}|�|�dS)N)rr�
get_sourcerr r!r.)rr/rrr�test_get_sourceSsz"InspectLoaderTests.test_get_sourcecCs |jj�tjj�}|�|�dS)N)rr�
is_packagerr r!ZassertFalse)rr/rrr�test_is_packageXsz"InspectLoaderTests.test_is_packageNzall modules are built inc	CsBxdD]}t|jj|�}qW|�t��}|tjj�WdQRXdS)N)r-r1r3)rrrr$r%rr �bad_name)rZ	meth_name�methodr'rrr�test_not_builtin]s
z#InspectLoaderTests.test_not_builtin)rr*r+r0r2r4�unittest�skipIfrr r5r7rrrrr,Isr,�__main__)rrrZimport_importlibrrrr8r9r r!rZ	test_bothZFrozen_LoaderTestsZSource_LoaderTestsr,ZFrozen_InspectLoaderTestsZSource_InspectLoaderTestsr�mainrrrr�<module>s

;"