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: //proc/self/root/var/opt/nydus/ops/importlib_resources/tests/__pycache__/test_open.cpython-39.pyc
a

�,�h��@s�ddlZddlZddlmZddlmZddlmZGdd�dejej	�Z
Gd	d
�d
ejej	�ZGdd�d�ZGd
d�deej	�Z
Gdd�deejej	�Zedkr�e��dS)�N�)�data01)�util�)�FileNotFoundErrorc@seZdZdd�ZdS)�CommonBinaryTestscCs0t�||��Wd�n1s"0YdS�N)�	resources�open_binary��self�package�path�r�T/opt/nydus/tmp/pip-target-wkfpz8uv/lib/python/importlib_resources/tests/test_open.py�execute
szCommonBinaryTests.executeN��__name__�
__module__�__qualname__rrrrrr	src@seZdZdd�ZdS)�CommonTextTestscCs0t�||��Wd�n1s"0YdSr)r	�	open_textrrrrrszCommonTextTests.executeNrrrrrrsrc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�	OpenTestscCsFt�|jd��$}|��}|�|d�Wd�n1s80YdS)N�
utf-8.filesHello, UTF-8 world!
)r	r
�data�read�assertEqual�r�fp�resultrrr�test_open_binaryszOpenTests.test_open_binarycCsFt�|jd��$}|��}|�|d�Wd�n1s80YdS)NrzHello, UTF-8 world!
�r	rrrrrrrr�test_open_text_default_encodingsz)OpenTests.test_open_text_default_encodingcCsJt�|jddd��}|��}Wd�n1s00Y|�|d�dS)N�utf-16.filezutf-16�strictzHello, UTF-16 world!
r!rrrr�test_open_text_given_encoding s
�&z'OpenTests.test_open_text_given_encodingcCs�t�|jddd��}|�t|j�Wd�n1s60Yt�|jddd��}|��}Wd�n1sp0Y|�|d�dS)Nr#zutf-8r$�ignorez*Hello, UTF-16 world!
)r	rr�assertRaises�UnicodeErrorrrrrrr�test_open_text_with_errors&s
�,
�&�z$OpenTests.test_open_text_with_errorscCs|�ttj|jd�dS�Nzdoes-not-exist)r'rr	r
r�rrrr�"test_open_binary_FileNotFoundError4s
�z,OpenTests.test_open_binary_FileNotFoundErrorcCs|�ttj|jd�dSr*)r'rr	rrr+rrr� test_open_text_FileNotFoundError9s
�z*OpenTests.test_open_text_FileNotFoundErrorN)	rrrr r"r%r)r,r-rrrrrsrc@seZdZdd�ZdS)�
OpenDiskTestscCs
t|_dSr)rrr+rrr�setUp@szOpenDiskTests.setUpN)rrrr/rrrrr.?sr.c@seZdZdS)�OpenZipTestsN)rrrrrrrr0Dsr0�__main__)�unittestZimportlib_resourcesr	�rrZ_compatrZCommonTestsZTestCaserrrr.ZZipSetupr0r�mainrrrr�<module>s*