HEX
Server: LiteSpeed
System: Linux server.nevid-deploma.com 4.18.0-553.111.1.lve.el8.x86_64 #1 SMP Fri Mar 13 13:42:17 UTC 2026 x86_64
User: smilepac (1037)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/cppython/lib/python3.8/test/test_importlib/__pycache__/test_read.cpython-38.opt-2.pyc
U

/D�g��@s�ddlZddlmZmZddlmZddlmZGdd�dejej�Z	Gdd	�d	ejej�Z
Gd
d�d�ZGdd
�d
eej�ZGdd�deej
ej�Zedkr�e��dS)�N)�
import_module�	resources�)�data01)�utilc@seZdZdd�ZdS)�CommonBinaryTestscCst�||�dS�N)r�read_binary��self�package�path�r�</opt/cppython/lib/python3.8/test/test_importlib/test_read.py�execute	szCommonBinaryTests.executeN��__name__�
__module__�__qualname__rrrrrrsrc@seZdZdd�ZdS)�CommonTextTestscCst�||�dSr)r�	read_textr
rrrrszCommonTextTests.executeNrrrrrr
src@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�	ReadTestscCst�|jd�}|�|d�dS)N�binary.file�)rr	�data�assertEqual�r�resultrrr�test_read_binaryszReadTests.test_read_binarycCst�|jd�}|�|d�dS)Nz
utf-8.filezHello, UTF-8 world!
�rrrrrrrr�test_read_text_default_encodingsz)ReadTests.test_read_text_default_encodingcCs"tj|jddd�}|�|d�dS)N�utf-16.filezutf-16)�encodingzHello, UTF-16 world!
rrrrr�test_read_text_given_encodings�z'ReadTests.test_read_text_given_encodingcCs6|�ttj|jd�tj|jddd�}|�|d�dS)Nr!�ignore)�errorsz*Hello, UTF-16 world!
)ZassertRaises�UnicodeErrorrrrrrrrr�test_read_text_with_errors s��z$ReadTests.test_read_text_with_errorsN)rrrrr r#r'rrrrrsrc@seZdZeZdS)�
ReadDiskTestsN)rrrrrrrrrr(,sr(c@seZdZdd�Zdd�ZdS)�ReadZipTestscCs$td�}t�|d�}|�|d�dS�Nzziptestdata.subdirectoryrr)rrr	r)rZ	submodulerrrr�test_read_submodule_resource1s�z)ReadZipTests.test_read_submodule_resourcecCst�dd�}|�|d�dSr*)rr	rrrrr�$test_read_submodule_resource_by_name7s
�z1ReadZipTests.test_read_submodule_resource_by_nameN)rrrr+r,rrrrr)0sr)�__main__)Zunittest�	importlibrr�rrZCommonResourceTestsZTestCaserrrr(ZZipSetupr)r�mainrrrr�<module>s