Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/test_unicode_file.cpython-312.pyc

�

'Μg���`�ddlZddlZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZejjs"	e
jej ��d�ZGd�dej*�Zedk(rej0�yy#eef$rej&d��wxYw)�N)�rmtree�
change_cwd�TESTFN_UNICODE�TESTFN_UNENCODABLE�create_empty_filez1No Unicode filesystem semantics on this platform.c�n�tjj|�rtj|�yy�N)�os�path�exists�unlink)�filenames �3/usr/local/lib/python3.12/test/test_unicode_file.py�remove_if_existsrs#��	�w�w�~�~�h��
�	�	�(�� �c�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�TestUnicodeFilesc
��|jtjj|��|jtjj	|��|jtj
|tj��|jtjjtjj|���|jtjj	tjj|���|jtj
tjj|�tj��tj|d�tj|d�tj|tj�tj�f�|j||�|jtjj|�tjjtjtj|��d�k(�tjjtjj|��\}}tj|�}t!j"d|�}|D�cgc]}t!j"d|���}}|j%||�ycc}w)Ni�r�NFD)�
assertTruer
rr�isfile�access�R_OK�abspath�chmod�utime�time�_do_copyish�glob�escape�split�listdir�unicodedata�	normalize�assertIn)�selfrr�base�	file_list�fs      r�
_do_singlezTestUnicodeFiles._do_singles�����������x�0�1���������x�0�1�����	�	�(�B�G�G�4�5���������r�w�w���x�'@�A�B���������r�w�w���x�'@�A�B�����	�	�"�'�'�/�/�(�";�R�W�W�E�F�
����5�!�
����4� �
����D�I�I�K�����5�6�����8�,�����G�G�O�O�H�%�r�w�w���t�y�y����X�AV�7W�XY�7Z�'[�[�	]��W�W�]�]�2�7�7�?�?�8�#<�=�
��d��J�J�t�$�	��$�$�U�D�1��>G�H�i��[�*�*�5�!�4�i�	�H��
�
�d�I�&��Is�Lc��|jtjj|��tj||dz�|jtjj|��|jtjj|dz��tj|dz|�|jtjj|dz��|jtjj|��t
j||dz�tj|dz�t
j||dz�|jtjj|��|jtjj|dz��t
j|dz|�|jtjj|dz��|jtjj|��t
j||dz�|jtjj|dz��tj|dz�|jtjj|dz��y)Nz.new)rr
rr�rename�assertFalse�shutil�copyr
�mover�copy2)r&�	filename1�	filename2s   rrzTestUnicodeFiles._do_copyish9s�����������y�1�2�
�	�	�)�Y��/�0���������	�2�3���������y�6�'9�:�;�
�	�	�)�f�$�i�0���������	�F�(:�;�<���������y�1�2����I�y�6�1�2�
�	�	�)�f�$�%����I�y�6�1�2���������	�2�3���������y�6�'9�:�;����I��&�	�2���������	�F�(:�;�<���������y�1�2�	���Y�	�F� 2�3���������y�6�'9�:�;�
�	�	�)�f�$�%���������	�F�(:�;�<rc��tjj|�rt|�tj|�	t|�5tj�}|}tjd|�}tjd|�}|jtjj|�|�ddd�tj|�y#1swY�xYw#tj|�wxYw)Nr)r
r�isdirr�mkdirr�getcwdr#r$�assertEqual�basename�rmdir)r&�	make_name�
chdir_name�
cwd_result�name_results     r�
_do_directoryzTestUnicodeFiles._do_directoryVs���
�7�7�=�=��#��9��
�����
	 ��J�'��Y�Y�[�
�'��(�2�2�5�*�E�
�)�3�3�E�;�G��� � ����!1�!1�*�!=�k�J�(�
�H�H�Y��(�'��
�H�H�Y��s%�C(�A2C�>C(�C%�!C(�(C?c�&�t|�t|�	|j|�tj|�|jtjj|��tj|tjtjz�}tj|�	|j|�tj|�y#tj|�wxYw#tj|�wxYwr	)rrr*r
r
rrr�open�O_CREAT�O_WRONLY�close)r&rr)s   r�_test_singlezTestUnicodeFiles._test_singlehs�����"��(�#�	 ��O�O�H�%��I�I�h�����B�G�G�N�N�8�4�4�5��G�G�H�b�j�j�2�;�;�6�7��
�����	 ��O�O�H�%��I�I�h���
�I�I�h���
�I�I�h��s�C�8C9�C6�9Dc�f�|jt�t�|jt�yyr	)rErr)r&s r�test_single_filesz"TestUnicodeFiles.test_single_fileszs*�����.�)��)����0�1�*rc��d}|jt|zt|z�t�!|jt|zt|z�yy)Nz.dir)r?rr)r&�exts  r�test_directoriesz!TestUnicodeFiles.test_directoriessL�������>�#�-�~�c�/A�B��)����1�#�5�1�#�5�
7�*rN)	�__name__�
__module__�__qualname__r*rr?rErGrJ�rrrrs ��'�4=�: �$ �$2�
	7rr�__main__)r
rrr.�sysr#�unittest�test.support.os_helperrrrrrr�supports_unicode_filenames�encode�getfilesystemencoding�UnicodeError�	TypeError�SkipTestr�TestCaserrK�mainrNrr�<module>r[s�����
���+�+�
�w�w�)�)�U�����7�c�7�7�9�:��o7�x�(�(�o7�d�z���H�M�M�O���w
�)�$�U� �h��� S�T�T�U�s�!B�B-

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists