Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/test/__pycache__/test_unicode_file.cpython-38.pyc
U

>��g��	@s�ddlZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZm
Z
ejjs�ze�e
�Wn"eefk
r�e�d��YnXdd�ZGdd�dej�Zdd	�Zed
kr�e�dS)�N)�run_unittest�rmtree�
change_cwd�TESTFN_ENCODING�TESTFN_UNICODE�TESTFN_UNENCODABLE�create_empty_filez1No Unicode filesystem semantics on this platform.cCstj�|�rt�|�dS�N)�os�path�exists�unlink)�filename�r�5/opt/cppython/lib/python3.8/test/test_unicode_file.py�remove_if_existssrc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�TestUnicodeFilesc
Cs>|�tj�|��|�tj�|��|�t�|tj��|�tj�tj�|���|�tj�tj�|���|�t�tj�|�tj��t�|d�t�	|d�t�	|t
�
�t
�
�f�|�||�|�tj�|�tj�t�t�
|��d�k�tj�tj�|��\}}t�|�}t�d|�}dd�|D�}|�||�dS)Ni�r�NFDcSsg|]}t�d|��qS)r)�unicodedata�	normalize)�.0�frrr�
<listcomp>2sz/TestUnicodeFiles._do_single.<locals>.<listcomp>)�
assertTruer
rr�isfile�access�R_OK�abspath�chmod�utime�time�_do_copyish�glob�escape�split�listdirrrZassertIn)�selfrr�baseZ	file_listrrr�
_do_singles$&�
zTestUnicodeFiles._do_singlecCs^|�tj�|��t�||d�|�tj�|��|�tj�|d��t�|d|�|�tj�|d��|�tj�|��t�||d�t�|d�t�	||d�|�tj�
|��|�tj�
|d��t�	|d|�|�tj�
|d��|�tj�
|��t�||d�|�tj�|d��t�|d�|�tj�
|d��dS)Nz.new)rr
rr�renameZassertFalse�shutil�copyr
�mover�copy2)r&Z	filename1�	filename2rrrr!7s&zTestUnicodeFiles._do_copyishc	Cs�tj�|�rt|�t�|�zPt|��>t��}|}t�	d|�}t�	d|�}|�
tj�|�|�W5QRXW5t�|�XdS)Nr)r
r�isdirr�mkdir�rmdirr�getcwdrrZassertEqual�basename)r&Z	make_nameZ
chdir_nameZ
cwd_resultZname_resultrrr�
_do_directoryTs

"zTestUnicodeFiles._do_directoryc	Csxt|�t|�z|�|�W5t�|�X|�tj�|��t�|tj	�}t�
|�z|�|�W5t�|�XdSr	)rrr
r
r(rrr�open�O_CREAT�close)r&rrrrr�_test_singlefs
zTestUnicodeFiles._test_singlecCs |�t�tdk	r|�t�dSr	)r8rr)r&rrr�test_single_filesxs
z"TestUnicodeFiles.test_single_filescCs8d}|�t|t|�tdk	r4|�t|t|�dS)Nz.dir)r4rr)r&�extrrr�test_directories}s
�z!TestUnicodeFiles.test_directoriesN)	�__name__�
__module__�__qualname__r(r!r4r8r9r;rrrrrsrcCstt�dSr	)rr<rrrr�	test_main�sr?�__main__)r
r"r r*rZunittestZtest.supportrrrrrrrr�supports_unicode_filenames�encode�UnicodeError�	TypeErrorZSkipTestrZTestCaserr?r<rrrr�<module>s $q

F1le Man4ger