HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //var/opt/nydus/ops/importlib_resources/tests/__pycache__/test_read.cpython-39.pyc
a

�,�h��@s�ddlZddlZddlmZddlmZddlmZGdd�dejej	�Z
Gdd	�d	ejej	�ZGd
d�d�ZGdd
�d
eej	�Z
Gdd�deejej	�Zedkr�e��dS)�N�)�data01)�util)�
import_modulec@seZdZdd�ZdS)�CommonBinaryTestscCst�||�dS�N)�	resources�read_binary��self�package�path�r�T/opt/nydus/tmp/pip-target-wkfpz8uv/lib/python/importlib_resources/tests/test_read.py�execute
szCommonBinaryTests.executeN��__name__�
__module__�__qualname__rrrrrr	src@seZdZdd�ZdS)�CommonTextTestscCst�||�dSr)r�	read_textr
rrrrszCommonTextTests.executeNrrrrrrsrc@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!
)�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)r�	submodulerrrr�test_read_submodule_resource2s
�z)ReadZipTests.test_read_submodule_resourcecCst�dd�}|�|d�dSr+)rr	rrrrr�$test_read_submodule_resource_by_name8s�z1ReadZipTests.test_read_submodule_resource_by_nameN)rrrr-r.rrrrr*1sr*�__main__)�unittestZimportlib_resourcesr�rr�	importlibrZCommonTestsZTestCaserrrr)ZZipSetupr*r�mainrrrr�<module>s