HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/test/test_importlib/__pycache__/test_open.cpython-37.pyc
B

��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�||��WdQRXdS)N)r�open_binary)�self�package�path�r�9/usr/local/lib/python3.7/test/test_importlib/test_open.py�execute	szCommonBinaryTests.executeN)�__name__�
__module__�__qualname__r
rrrrrsrc@seZdZdd�ZdS)�CommonTextTestsc	Cst�||��WdQRXdS)N)r�	open_text)rr	r
rrrr
szCommonTextTests.executeN)rrrr
rrrrrsrc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�	OpenTestsc	Cs2t�|jd��}|��}|�|d�WdQRXdS)Nzbinary.files)rr�data�read�assertEqual)r�fp�resultrrr�test_open_binaryszOpenTests.test_open_binaryc	Cs2t�|jd��}|��}|�|d�WdQRXdS)Nz
utf-8.filezHello, UTF-8 world!
)rrrrr)rrrrrr�test_open_text_default_encodingsz)OpenTests.test_open_text_default_encodingc	Cs6t�|jddd��}|��}WdQRX|�|d�dS)Nzutf-16.filezutf-16�strictzHello, UTF-16 world!
)rrrrr)rrrrrr�test_open_text_given_encodingsz'OpenTests.test_open_text_given_encodingc	Csbt�|jddd��}|�t|j�WdQRXt�|jddd��}|��}WdQRX|�|d�dS)Nzutf-16.filezutf-8r�ignorez*Hello, UTF-16 world!
)rrr�assertRaises�UnicodeErrorrr)rrrrrr�test_open_text_with_errors%sz$OpenTests.test_open_text_with_errorscCs|�ttj|jd�dS)Nzdoes-not-exist)r�FileNotFoundErrorrrr)rrrr�"test_open_binary_FileNotFoundError3sz,OpenTests.test_open_binary_FileNotFoundErrorcCs|�ttj|jd�dS)Nzdoes-not-exist)rr!rrr)rrrr� test_open_text_FileNotFoundError8sz*OpenTests.test_open_text_FileNotFoundErrorN)	rrrrrrr r"r#rrrrrsrc@seZdZdd�ZdS)�
OpenDiskTestscCs
t|_dS)N)rr)rrrr�setUp?szOpenDiskTests.setUpN)rrrr%rrrrr$>sr$c@seZdZdS)�OpenZipTestsN)rrrrrrrr&Csr&�__main__)Zunittest�	importlibr�rrZCommonResourceTestsZTestCaserrrr$ZZipSetupr&r�mainrrrr�<module>s*