Your IP : 216.73.216.85


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_read.cpython-310.pyc

o

0�i��@s�ddlZddlmZmZddlmZddlmZGdd�dejej�Z	Gdd	�d	ejej�Z
Gd
d�d�ZGdd
�d
eej�ZGdd�deej
ej�ZedkrUe��dSdS)�N)�
import_module�	resources�)�data01)�utilc@�eZdZdd�ZdS)�CommonBinaryTestscC�t�||�dS�N)r�read_binary��self�package�path�r�D/opt/alt/python310/lib64/python3.10/test/test_importlib/test_read.py�execute	�zCommonBinaryTests.executeN��__name__�
__module__�__qualname__rrrrrr�rc@r)�CommonTextTestscCr	r
)r�	read_textrrrrrrzCommonTextTests.executeNrrrrrr
rrc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�	ReadTestscC�t�|jd�}|�|d�dS)N�binary.file�)rr�data�assertEqual�r
�resultrrr�test_read_binary�zReadTests.test_read_binarycCr)Nz
utf-8.filezHello, UTF-8 world!
�rrrr r!rrr�test_read_text_default_encodingr$z)ReadTests.test_read_text_default_encodingcCs"tj|jddd�}|�|d�dS)N�utf-16.filezutf-16)�encodingzHello, UTF-16 world!
r%r!rrr�test_read_text_given_encodingsz'ReadTests.test_read_text_given_encodingcCs6|�ttj|jd�tj|jddd�}|�|d�dS)Nr'�ignore)�errorsz*Hello, UTF-16 world!
)ZassertRaises�UnicodeErrorrrrr r!rrr�test_read_text_with_errorss�z$ReadTests.test_read_text_with_errorsN)rrrr#r&r)r-rrrrrs
rc@seZdZeZdS)�
ReadDiskTestsN)rrrrrrrrrr.+sr.c@seZdZdd�Zdd�ZdS)�ReadZipTestscCs$td�}t�|d�}|�|d�dS�Nzziptestdata.subdirectoryrr)rrrr )r
Z	submoduler"rrr�test_read_submodule_resource0sz)ReadZipTests.test_read_submodule_resourcecCst�dd�}|�|d�dSr0)rrr r!rrr�$test_read_submodule_resource_by_name5sz1ReadZipTests.test_read_submodule_resource_by_nameN)rrrr1r2rrrrr//sr/�__main__)Zunittest�	importlibrr�rrZCommonResourceTestsZTestCaserrrr.ZZipSetupr/r�mainrrrr�<module>s�