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.10/test/test_importlib/__pycache__/test_main.cpython-310.opt-2.pyc
o

�i#�@s�ddlZddlZddlZddlZddlZddlZddlZzddlm	Z
Wney3ddlm	Z
Ynwddl
mZddlmZmZmZmZmZmZmZGdd�dejej�ZGdd	�d	ejej�ZGd
d�dejejej�ZGdd
�d
ejejej�ZGdd�dejejej�ZGdd�dejejej�Z Gdd�dejej�Z!Gdd�deje
j�Z"Gdd�dej�Z#Gdd�dejejej$ej�Z%dS)�N�)�fake_filesystem_unittest)�fixtures)�Distribution�
EntryPoint�PackageNotFoundError�
distributions�entry_points�metadata�versionc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�
BasicTestsz\d+\.\d+(\.\d)?cCst�d�}dS)Nzdistinfo-pkg)r�	from_name)�self�dist�r�:/usr/local/lib/python3.10/test/test_importlib/test_main.py�test_retrieves_version_of_self�z)BasicTests.test_retrieves_version_of_selfcC�:|�t��t�d�Wd�dS1swYdS�Nzdoes-not-exist��assertRaisesrrr
�rrrr�test_for_name_does_not_exist"s"�z'BasicTests.test_for_name_does_not_existcCs:|�t��}t�d�Wd�dS1swYdSrr)r�ctxrrr�(test_package_not_found_mentions_metadata&s"�z3BasicTests.test_package_not_found_mentions_metadatacCs|�tt�dS�N)ZassertIsInstancer�typerrrr�test_new_style_classes0sz!BasicTests.test_new_style_classesN)�__name__�
__module__�__qualname__Zversion_patternrrrrrrrrrs
rc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�ImportTestscCr)NZdoes_not_exist)r�ImportError�	importlib�
import_modulerrrr�test_import_nonexistent_module5s"�z*ImportTests.test_import_nonexistent_modulecCs$tdd�d}|�|��jd�dS)N�entries��group�main)r	�assertEqual�loadr�r�eprrr�test_resolve;szImportTests.test_resolvecCs tdd�d}|�|jd�dS)Nr'r(zns:subzmod:main)r	r+�valuer-rrr�"test_entrypoint_with_colon_in_name?sz.ImportTests.test_entrypoint_with_colon_in_namecCstdddd�}dS)Nr.zimportlib.metadata�grp)�namer0r))rr-rrr�test_resolve_without_attrCs

�z%ImportTests.test_resolve_without_attrN)rr r!r&r/r1r4rrrrr"4s
r"c@s4eZdZedd��Zdd�Zedd��Zdd�Zd	S)
�NameNormalizationTestscC�X	|d}|��|d}|jddd��}|�d�Wd�dS1s%wYdS)Nzmy_pkg.dist-info�METADATA�w�utf-8��encoding�
Version: 1.0
zmy-pkg��mkdir�open�write��site_dir�metadata_dirr
Zstrmrrr�pkg_with_dashesM�
��z&NameNormalizationTests.pkg_with_dashescC�|�|j�}dSr)rDrB�r�pkg_namerrr�-test_dashes_in_dist_name_found_as_underscoresZszDNameNormalizationTests.test_dashes_in_dist_name_found_as_underscorescCr6)NzCherryPy.dist-infor7r8r9r:r<ZCherryPyr=rArrr�pkg_with_mixed_case`rEz*NameNormalizationTests.pkg_with_mixed_casecCrFr)rJrBrGrrr� test_dist_name_found_as_any_casemsz7NameNormalizationTests.test_dist_name_found_as_any_caseN)rr r!�staticmethodrDrIrJrKrrrrr5Ls

r5c@s4eZdZedd��Zedd��Zdd�Zdd�Zd	S)
�
NonASCIITestscCr6)N�portend.dist-infor7r8r9r:uDescription: pôrˈtend�portendr=�rBrCr
�fprrr�pkg_with_non_ascii_descriptionvrEz,NonASCIITests.pkg_with_non_ascii_descriptioncCsb	|d}|��|d}|jddd��}|�t�d����Wd�dS1s*wYdS)NrNr7r8r9r:uK
                Name: portend

                pôrˈtend
                rO)r>r?r@�textwrap�dedent�striprPrrr�'pkg_with_non_ascii_description_egg_info�s��
�
�
z5NonASCIITests.pkg_with_non_ascii_description_egg_infocC�|�|j�}t|�}dSr)rRrBr
�rrH�metarrr�test_metadata_loads��z!NonASCIITests.test_metadata_loadscCrWr)rVrBr
rXrrr�test_metadata_loads_egg_info�r[z*NonASCIITests.test_metadata_loads_egg_infoN)rr r!rLrRrVrZr\rrrrrMus

rMc@�eZdZdd�Zdd�ZdS)�DiscoveryTestscCstt��}dSr)�listr)rZdistsrrr�test_package_discovery�rz%DiscoveryTests.test_package_discoverycCs@|�t��ttddd��Wd�dS1swYdS)NZ	something�else)�contextr3)r�
ValueErrorr_rrrrr�test_invalid_usage�s"�z!DiscoveryTests.test_invalid_usageN)rr r!r`rdrrrrr^�sr^c@r])�
DirectoryTestcCsH|j�d���|�t��
td�Wd�dS1swYdS)NzEGG-INFOzunknown-package)rB�joinpathr>rrrrrrr�
test_egg_info�s
"�zDirectoryTest.test_egg_infoc	Cs�|j�d�}|��|�|��*|�t��td�Wd�n1s$wYWd�dSWd�dS1s<wYdS)Nzfoo-3.6.eggZfoo)rBrfr>Zadd_sys_pathrrr)rZeggrrr�test_egg�s
��"�zDirectoryTest.test_eggN)rr r!rgrhrrrrre�srec@seZdZdZdd�ZdS)�MissingSysPathz/does-not-existcCs	tj��dSr)r$r
rrrrr�test_discovery�szMissingSysPath.test_discoveryN)rr r!rBrjrrrrri�srics(eZdZdZ�fdd�Zdd�Z�ZS)�InaccessibleSysPathz/access-deniedcs,tt|���|��|jj|jdd�dS)Nr)Z	perm_bits)�superrk�setUpZ
setUpPyfakefs�fsZ
create_dirrBr��	__class__rrrm�szInaccessibleSysPath.setUpcCs	ttj���dSr)r_r$r
rrrrrrj�sz"InaccessibleSysPath.test_discovery)rr r!rBrmrj�
__classcell__rrrorrk�srkcs\eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Z�ZS)�TestEntryPointscs&tt|�j|�tj�ddd�|_dS)Nr3r0r))rlrr�__init__r$r
rr.)r�argsrorrrs�szTestEntryPoints.__init__cCst�t�|j��}dSr)�pickle�loads�dumpsr.)rZrevivedrrr�test_entry_point_pickleable�sz+TestEntryPoints.test_entry_point_pickleablecCs:	|�t��
d|j_Wd�dS1swYdS)NZbadactor)r�AttributeErrorr.r3rrrr�test_immutable�s
"�zTestEntryPoints.test_immutablecC�dSrrrrrr�	test_repr��zTestEntryPoints.test_reprcCst|j�dSr)�hashr.rrrr�
test_hashable�szTestEntryPoints.test_hashablec	Csx|�t��-tjdd��t�|j�Wd�n1swYWd�dSWd�dS1s5wYdS)NT)�record)r�	Exception�warnings�catch_warnings�jsonrwr.rrrr�test_json_dump�s��"�zTestEntryPoints.test_json_dumpcCr{rrrrrr�test_module�r}zTestEntryPoints.test_modulecCr{rrrrrr�	test_attr�r}zTestEntryPoints.test_attrcCs ttddd�tddd�g�dS)N�b�valr)�a)�sortedrrrrr�
test_sortable�s


��zTestEntryPoints.test_sortable)
rr r!rsrxrzr|rr�r�r�r�rqrrrorrr�srrc@seZdZdd�ZdS)�
FileSystemcCs&tj|��ii|jd�tt��dS)N)�prefix)rZbuild_filesZunicode_filenamerBr_rrrrr�test_unicode_dir_on_sys_path
s

�z'FileSystem.test_unicode_dir_on_sys_pathN)rr r!r�rrrrr�sr�)&�rer�rurSZunittestr��importlib.metadatar$Z!pyfakefs.fake_filesystem_unittestrZffsr#Zstubs�rrrrrr	r
rZDistInfoPkgZTestCaserr"Z	OnSysPathZSiteDirr5rMZ
EggInfoPkgr^rerirkrrZFileBuilderr�rrrr�<module>s4�$).
-�