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_open.cpython-38.opt-2.pyc
U

/D�g��@s�ddlZddlmZddlmZddlmZGdd�dejej�ZGdd	�d	ejej�Z	Gd
d�d�Z
Gdd
�d
e
ej�ZGdd�de
ejej�Z
edkr�e��dS)�N)�	resources�)�data01)�utilc@seZdZdd�ZdS)�CommonBinaryTestsc	Cst�||��W5QRXdS�N)r�open_binary��self�package�path�r
�</opt/cppython/lib/python3.8/test/test_importlib/test_open.py�execute	szCommonBinaryTests.executeN��__name__�
__module__�__qualname__rr
r
r
rrsrc@seZdZdd�ZdS)�CommonTextTestsc	Cst�||��W5QRXdSr)r�	open_textr	r
r
rrszCommonTextTests.executeNrr
r
r
rrsrc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�	OpenTestsc	Cs2t�|jd��}|��}|�|d�W5QRXdS)Nzbinary.files)rr�data�read�assertEqual�r
�fp�resultr
r
r�test_open_binaryszOpenTests.test_open_binaryc	Cs2t�|jd��}|��}|�|d�W5QRXdS)Nz
utf-8.filezHello, UTF-8 world!
�rrrrrrr
r
r�test_open_text_default_encodingsz)OpenTests.test_open_text_default_encodingc	Cs6t�|jddd��}|��}W5QRX|�|d�dS)N�utf-16.filezutf-16�strictzHello, UTF-16 world!
rrr
r
r�test_open_text_given_encodings�z'OpenTests.test_open_text_given_encodingc	Csbt�|jddd��}|�t|j�W5QRXt�|jddd��}|��}W5QRX|�|d�dS)Nr zutf-8r!�ignorez*Hello, UTF-16 world!
)rrr�assertRaises�UnicodeErrorrrrr
r
r�test_open_text_with_errors%s(���z$OpenTests.test_open_text_with_errorscCs|�ttj|jd�dS�Nzdoes-not-exist)r$�FileNotFoundErrorrrr�r
r
r
r�"test_open_binary_FileNotFoundError3s�z,OpenTests.test_open_binary_FileNotFoundErrorcCs|�ttj|jd�dSr')r$r(rrrr)r
r
r� test_open_text_FileNotFoundError8s�z*OpenTests.test_open_text_FileNotFoundErrorN)	rrrrrr"r&r*r+r
r
r
rrsrc@seZdZdd�ZdS)�
OpenDiskTestscCs
t|_dSr)rrr)r
r
r�setUp?szOpenDiskTests.setUpN)rrrr-r
r
r
rr,>sr,c@seZdZdS)�OpenZipTestsN)rrrr
r
r
rr.Csr.�__main__)Zunittest�	importlibr�rrZCommonResourceTestsZTestCaserrrr,ZZipSetupr.r�mainr
r
r
r�<module>s*