Your IP : 216.73.217.32


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.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.datacCsbt�|j��|�}|j�t�|��}|j�d�s:J|j��tj	�
dt|��|j�tj	j
d�dS)Nzexample-r)r	r�root�joinpath�
enter_contextZas_file�name�
startswith�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_paths
zTestZip._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_scriptsr!zexample:main�Example)�dictrr$�value)rZscriptsZentry_pointrrr�test_zip_entry_points's
zTestZip.test_zip_entry_pointscCs|�td��d��dS)Nr!zdoes 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_insensitivecCs2td�D]$}t|j�|��}d|vsJ|��qdS)Nr!z.whl/�rrZdistZlocate_file�rrrrrr�
test_files4szTestZip.test_filescCs,tttjdd�d��}t|�dks(J�dS)N�)r)�listrrr�len)rZdistsrrr�test_one_distribution9szTestZip.test_one_distributionN)
�__name__�
__module__�__qualname__rrr r%r&r*r,r-r0r4rrrrrsrc@seZdZdd�Zdd�ZdS)�TestEggcCs$t�|_|�|jj�|�d�dS)Nzexample-21.12-py3.6.eggrrrrrr @sz
TestEgg.setUpcCs2td�D]$}t|j�|��}d|vsJ|��qdS)Nr!z.egg/r.r/rrrr0GszTestEgg.test_filesN)r5r6r7r r0rrrrr8>sr8)rZunittest�
contextlibr�importlib.metadatarrrrrr�	importlibr	Ztest.supportr
ZTestCaserr8rrrr�<module>s /