Your IP : 216.73.216.213


Current Path : /opt/alt/python39/lib64/python3.9/test/test_importlib/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/test/test_importlib/__pycache__/test_zip.cpython-39.opt-1.pyc

a

XC?h�	�@s�ddlZddlZddlmZddlmZmZmZmZm	Z	m
Z
ddlmZddl
mZe�Gdd�dej��Ze�Gdd	�d	e��ZdS)
�N)�	ExitStack)�distribution�entry_points�files�PackageNotFoundError�version�
distributions)�	resources)�
requires_zlibc@sXeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�ZdS)�TestZipztest.test_importlib.datacCsLt�|j��|�}|j�t�|��}tj�dt	|��|j�
tjjd�dS)Nr)r	r�root�joinpath�
enter_contextZas_file�sys�path�insert�str�callback�pop)�self�filenameZpkg_file�file�r�A/opt/alt/python39/lib64/python3.9/test/test_importlib/test_zip.py�_fixture_on_pathszTestZip._fixture_on_pathcCs$t�|_|�|jj�|�d�dS)Nzexample-21.12-py3-none-any.whl�rr	Z
addCleanup�closer�rrrr�setUpsz
TestZip.setUpcCs|�td�d�dS)N�example�21.12��assertEqualrrrrr�test_zip_version szTestZip.test_zip_versioncCs6|�t��td�Wd�n1s(0YdS)Nzdefinitely-not-installed)ZassertRaisesrrrrrr�test_zip_version_does_not_match#sz'TestZip.test_zip_version_does_not_matchcCs>tt�d�}|d}|�|jd�|d}|�|jd�dS)NZconsole_scriptsrzexample:main�Example)�dictrr"�value)rZscriptsZentry_pointrrr�test_zip_entry_points's
zTestZip.test_zip_entry_pointscCs|�td��d��dS)Nrzdoes not exist)ZassertIsNoner�	read_textrrrr�test_missing_metadata.szTestZip.test_missing_metadatacCs|�td�d�dS)Nr%r r!rrrr�test_case_insensitive1szTestZip.test_case_insensitivecCs"td�D]}t|j�|��}qdS�Nr�rrZdistZlocate_file�rrrrrr�
test_files4szTestZip.test_filescCstttjdd�d��}dS)N�)r)�listrrr)rZdistsrrr�test_one_distribution9szTestZip.test_one_distributionN)
�__name__�
__module__�__qualname__rrrr#r$r(r*r+r/r2rrrrrsrc@seZdZdd�Zdd�ZdS)�TestEggcCs$t�|_|�|jj�|�d�dS)Nzexample-21.12-py3.6.eggrrrrrr@sz
TestEgg.setUpcCs"td�D]}t|j�|��}qdSr,r-r.rrrr/GszTestEgg.test_filesN)r3r4r5rr/rrrrr6>sr6)rZunittest�
contextlibr�importlib.metadatarrrrrr�	importlibr	Ztest.supportr
ZTestCaserr6rrrr�<module>s /