Your IP : 216.73.217.32


Current Path : /opt/alt/python310/lib64/python3.10/test/test_importlib/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/test/test_importlib/__pycache__/test_zip.cpython-310.pyc

o

0�in
�@s�ddlZddlZddlmZddlmZmZmZmZm	Z	m
Z
ddlmZddl
mZe�Gdd�dej��Ze�Gdd	�d	e��ZdS)
�N)�	ExitStack)�PackageNotFoundError�distribution�
distributions�entry_points�files�version)�	resources)�
requires_zlibc@sXeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�ZdS)�TestZipztest.test_importlib.datacCsbt�|j��|�}|j�t�|��}|j�d�sJ|j��tj	�
dt|��|j�tj	j
d�dS)Nzexample-r)r	r�rootZjoinpath�
enter_contextZas_file�name�
startswith�sys�path�insert�str�callback�pop)�self�filenameZpkg_file�file�r�C/opt/alt/python310/lib64/python3.10/test/test_importlib/test_zip.py�_fixture_on_paths
zTestZip._fixture_on_pathcC�$t�|_|�|jj�|�d�dS)Nzexample-21.12-py3-none-any.whl�rr	Z
addCleanup�closer�rrrr�setUp�z
TestZip.setUpcC�|�td�d�dS)N�example�21.12��assertEqualrrrrr�test_zip_version$�zTestZip.test_zip_versioncCs8|�t��
td�Wd�dS1swYdS)Nzdefinitely-not-installed)ZassertRaisesrrrrrr�test_zip_version_does_not_match's
"�z'TestZip.test_zip_version_does_not_matchcCs:tdd�}|d}|�|jd�|d}|�|jd�dS)NZconsole_scripts)�groupr#zexample:main�Example)rr&�value)rZscriptsZentry_pointrrr�test_zip_entry_points+s

zTestZip.test_zip_entry_pointscCs|�td��d��dS)Nr#zdoes not exist)ZassertIsNonerZ	read_textrrrr�test_missing_metadata2szTestZip.test_missing_metadatacCr")Nr+r$r%rrrr�test_case_insensitive5r(zTestZip.test_case_insensitivecC�2td�D]}t|j�|��}d|vsJ|��qdS)Nr#z.whl/�rr�distZlocate_file�rrrrrr�
test_files8��zTestZip.test_filescCs,tttjdd�d��}t|�dksJ�dS)N�)r)�listrrr�len)rZdistsrrr�test_one_distribution=szTestZip.test_one_distributionN)
�__name__�
__module__�__qualname__rrr r'r)r-r.r/r4r9rrrrrsrc@s$eZdZdd�Zdd�Zdd�ZdS)�TestEggcCr)Nzexample-21.12-py3.6.eggrrrrrr Dr!z
TestEgg.setUpcCr0)Nr#z.egg/r1r3rrrr4Kr5zTestEgg.test_filescCstd�}|jdksJ�dS)Nr#)rZ_normalized_name)rr2rrr�test_normalized_namePszTestEgg.test_normalized_nameN)r:r;r<r r4r>rrrrr=Bsr=)rZunittest�
contextlibr�importlib.metadatarrrrrr�	importlibr	Ztest.supportr
ZTestCaserr=rrrr�<module>s /