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: //proc/thread-self/root/usr/local/lib/python3.7/test/__pycache__/test_unicode_file.cpython-37.pyc
B

��g��	@s�ddlZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZm
Z
ejjs�ye�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�2/usr/local/lib/python3.7/test/test_unicode_file.py�remove_if_existssrc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�TestUnicodeFilescCs8|�tj�|��|�tj�|��|�t�|tj��|�tj�tj�|���|�tj�tj�|���|�t�tj�|�tj��t�|d�t�	|d�t�	|t
�
�t
�
�f�|�||�|�tj�|�tj�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	r
r�isfile�access�R_OK�abspath�chmod�utime�time�_do_copyish�glob�split�listdirrrZassertIn)�selfr
r
�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	r
r�renameZassertFalse�shutil�copyrZmoverZcopy2)r$Z	filename1�	filename2rrrr 7s&zTestUnicodeFiles._do_copyishc	Cs�tj�|�rt|�t�|�zPt|��>t��}|}t�d|�}t�d|�}|�	tj�
|�|�WdQRXWdt�|�XdS)Nr)r	r
�isdirr�mkdirr�getcwdrrZassertEqual�basename�rmdir)r$Z	make_nameZ
chdir_nameZ
cwd_resultZname_resultrrr�
_do_directoryTs

"zTestUnicodeFiles._do_directoryc	Csxt|�t|�z|�|�Wdt�|�X|�tj�|��t�|tj	�}t�
|�z|�|�Wdt�|�XdS)N)rrr&r	rrr
r�open�O_CREAT�close)r$r
rrrr�_test_singlefs
zTestUnicodeFiles._test_singlecCs |�t�tdk	r|�t�dS)N)r4rr)r$rrr�test_single_filesxs
z"TestUnicodeFiles.test_single_filescCs8d}|�t|t|�tdk	r4|�t|t|�dS)Nz.dir)r0rr)r$Zextrrr�test_directories}s

z!TestUnicodeFiles.test_directoriesN)	�__name__�
__module__�__qualname__r&r r0r4r5r6rrrrrsrcCstt�dS)N)rr7rrrr�	test_main�sr:�__main__)r	r!rr(rZunittestZtest.supportrrrrrrrr
�supports_unicode_filenames�encode�UnicodeError�	TypeErrorZSkipTestrZTestCaserr:r7rrrr�<module>s $q