HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/test/__pycache__/test_unicode_file_functions.cpython-311.opt-2.pyc
�

��Vc�����ddlZddlZddlZddlZddlmZddlmZgd�Zej	dkre�
gd���ejjsDej
��Z	eD]Ze�e���n#e$rejd���wxYwGd�d	ej��ZGd
�de��ZGd�d
e��ZGd�de��ZGd�de��Zedkrej��dSdS)�N��	normalize)�	os_helper)
�1_abc�2_asciiu
3_Grüß-Gottu4_Γειά-σαςu5_Здравствуйтеu6_にぽんu7_השקצץסu8_曨曩曫u9_曨שんдΓßu	10_΅´�darwin)	u	11_΅ϓϔu12_΅ϓϔu13_ ̈́ΎΫu14_ẛ῁῍῎῏῝῞῟῭u15_΅´𣏕u
16_   Au
17_   Au
18_   Az19_   Az>only NT+ and systems with Unicode-friendly filesystem encodingc��eZdZee��ZdZd�Zd�Ze	dfd�Z
d�Zej
dkree	fZneZd�Zejej
d	kd
��d���Zejej
d	kd
��d���Zd
�Zd�ZdS)�UnicodeFileTestsNc�j�	tjtj��n#t$rYnwxYw|�tjtj��t��}|jD]�}tj	�
tj|�|����}t|d��5}|�
|dz�d����ddd��n#1swxYwYtj|��|�|����||_dS�N�wb�
�utf-8)�os�mkdirr�TESTFN�FileExistsError�
addCleanup�rmtree�set�files�path�join�norm�open�write�encode�stat�add)�selfr�name�fs    �4D:\Python311\Lib\test\test_unicode_file_functions.py�setUpzUnicodeFileTests.setUp@sB��	��H�Y�%�&�&�&�&���	�	�	��D�	�������	�(�)�*:�;�;�;������J�	�	�D��7�<�<�	� 0�$�)�)�D�/�/�B�B�D��d�D�!�!�
5�Q�����d��*�*�7�3�3�4�4�4�
5�
5�
5�
5�
5�
5�
5�
5�
5�
5�
5����
5�
5�
5�
5��G�D�M�M�M��I�I�d�O�O�O�O���
�
�
s�!�
.�.�?,C7�7C;	�>C;	c�>�|jrt|j|��S|S�N)�normal_formr)r �ss  r#rzUnicodeFileTests.normPs%����	2��T�-�q�1�1�1���Tc
���|�|��5}||��ddd��n#1swxYwY|jj}|r'|�||d|j�d|�d|����dSdS)Nz
Function '�(z-) failed with bad filename in the exception: )�assertRaises�	exception�filename�assertEqual�__name__)r �fnr.�expected_exception�check_filename�c�exc_filenames       r#�_apply_failurezUnicodeFileTests._apply_failureUs����
�
�1�
2�
2�	�a��B�x�L�L�L�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��{�+���	D����\�8�8� �k�k�k�8�8�8�\�\�6C�
D�
D�
D�
D�
D�	D�	Ds�.�2�2c��|jD]�}d|z}|�t|��|�tj|��|�tj|��|�tj|��|�tj|��|�tj|����dS)N�not_)	rr6rrr�chdir�rmdir�remove�listdir�r r!s  r#�
test_failureszUnicodeFileTests.test_failures`s����J�	2�	2�D��D�=�D�����d�+�+�+�������.�.�.������$�/�/�/������$�/�/�/�����	�4�0�0�0�����
�D�1�1�1�1�	2�	2r)�win32c�,�|jD]�}t|d��}|�|dz�d����|���tj|��|�t
j||j	����dSr)
rrrr�closerrr6r<�_listdir_failure)r r!r"s   r#�	test_openzUnicodeFileTests.test_openqs����J�	I�	I�D��T�4� � �A�
�G�G�T�$�Y�&�&�w�/�/�0�0�0�
�G�G�I�I�I��G�D�M�M�M�����
�D�$�2G�H�H�H�H�	I�	Ir)rzirrelevant test on Mac OS Xc�:��t|j��}t��}tgd���D] �|t�fd�|D����z}�!||z}|D]�}|�t|��|�tj|��|�tj|��|�tj|��|�tj|��|�tj	|����dS)N)�NFC�NFD�NFKC�NFKDc3�8�K�|]}t�|��V��dSr&r)�.0�file�nfs  �r#�	<genexpr>z2UnicodeFileTests.test_normalize.<locals>.<genexpr>�s-�����@�@�$�)�B��-�-�@�@�@�@�@�@r))
rrr6rrrr9r:r;r<)r r�othersr!rLs    @r#�test_normalizezUnicodeFileTests.test_normalize}s����D�J���������4�4�4�5�5�	A�	A�B��c�@�@�@�@�%�@�@�@�@�@�@�F�F��%����	2�	2�D�����d�+�+�+�������.�.�.������$�/�/�/������$�/�/�/�����	�4�0�0�0�����
�D�1�1�1�1�
	2�	2r)c�B�t|j��}tj��5tjdt
��t
jtj	�
tj������}ddd��n#1swxYwYt
jtj	��}td�|D����}|�
|||�d|����|�
t|��t|����dS)N�ignorec3�jK�|].}tj�tj|��V��/dSr&)rrrrr)rJr"s  r#rMz0UnicodeFileTests.test_listdir.<locals>.<genexpr>�s5����@�@��"�'�,�,�y�/��3�3�@�@�@�@�@�@r)z != )rr�warnings�catch_warnings�simplefilter�DeprecationWarningrr<rrr�sys�getfilesystemencodingr/�len)r �sf0�f1�f2�sf2s     r#�test_listdirzUnicodeFileTests.test_listdir�s4���$�*�o�o��
�
$�
&�
&�	:�	:��!�(�,>�?�?�?���I�,�3�3��5�7�7�9�9�:�:�B�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:����	:�	:�	:�	:��Z�	�(�
)�
)���@�@�R�@�@�@�@�@������c����c�c�#:�;�;�;�����R���#�b�'�'�*�*�*�*�*s�AB�B�Bc�n�|jD],}tj|d��tjd|���-dS)N�tmp)rr�renamer=s  r#�test_renamezUnicodeFileTests.test_rename�sD���J�	#�	#�D��I�d�E�"�"�"��I�e�T�"�"�"�"�	#�	#r)c���tj�tjd��}d}tj|��5t
|d��5}|�|dz�d����ddd��n#1swxYwYtj	|tj
��tj|��ddd��dS#1swxYwYdS)NuGrüß-曨曩曫uß-曨曩曫r
rr)rrrrr�temp_cwdrrr�access�R_OKr;)r �dirnamer.r"s    r#�test_directoryzUnicodeFileTests.test_directory�sE���'�,�,�y�/�>�@�@��,��
�
��
(�
(�	 �	 ��h��%�%�
;������D��0�0��9�9�:�:�:�
;�
;�
;�
;�
;�
;�
;�
;�
;�
;�
;����
;�
;�
;�
;��I�h�r�w�'�'�'��I�h����		 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 ����	 �	 �	 �	 �	 �	 s6�C�,B
�>C�
B	�C�B	�6C�C�C)r0�
__module__�__qualname__r�	filenamesrr'r$r�FileNotFoundErrorr6r>rW�platform�NotADirectoryErrorrBrC�unittest�skipIfrOr^rbrh�r)r#r
r
<s/�������C�	�N�N�E��K���� ���+<�&*�	D�	D�	D�	D�	2�	2�	2��|�w��.�-�/@�@���-��I�I�I��X�_�S�\�X�-�/L�M�M�2�2�N�M�2�"�X�_�S�\�X�-�/L�M�M�	+�	+�N�M�	+�#�#�#�
 � � � � r)r
c��eZdZdZdS)�UnicodeNFCFileTestsrEN�r0rirjr'rqr)r#rsrs���������K�K�Kr)rsc��eZdZdZdS)�UnicodeNFDFileTestsrFNrtrqr)r#rwrw�rur)rwc��eZdZdZdS)�UnicodeNFKCFileTestsrGNrtrqr)r#ryry���������K�K�Kr)ryc��eZdZdZdS)�UnicodeNFKDFileTestsrHNrtrqr)r#r|r|�rzr)r|�__main__)rrWrorS�unicodedatar�test.supportrrkrm�extendr�supports_unicode_filenamesrX�
fsencodingr!r�UnicodeEncodeError�SkipTest�TestCaser
rsrwryr|r0�mainrqr)r#�<module>r�s2��
�	�	�	�
�
�
�
���������!�!�!�!�!�!�"�"�"�"�"�"�
�
�
�	�(�<�8���
���������$
�w�)�H�*��*�,�,�J�H��	$�	$�D��K�K�
�#�#�#�#�	$���H�H�H��h��!G�H�H�	H�H����
l �l �l �l �l �x�(�l �l �l �^�����*���������*���������+���������+�����z����H�M�O�O�O�O�O��s�A:�:B