python (3.11.7)
    e                     @   d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZm	Z	m
Z
mZmZ e j
        j        s:	  e
j         ej                               n# eef$ r  ej        d          w xY wd Z G d dej                  Zedk    r ej                     dS dS )    N)rmtree
change_cwdTESTFN_UNICODETESTFN_UNENCODABLEcreate_empty_filez1No Unicode filesystem semantics on this platform.c                 p    t           j                            |           rt          j        |            d S d S N)ospathexistsunlink)filenames    J/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_unicode_file.pyremove_if_existsr      s8    	w~~h 
	(     c                   2    e Zd Zd Zd Zd Zd Zd Zd ZdS )TestUnicodeFilesc           
         |                      t          j                            |                     |                      t          j                            |                     |                      t          j        |t          j                             |                      t          j                            t          j                            |                               |                      t          j                            t          j                            |                               |                      t          j        t          j                            |          t          j                             t          j        |d           t          j	        |d            t          j	        |t          j
                    t          j
                    f           |                     ||           |                      t          j                            |          t          j                            t          j        t          j
        |                    d                   k               t          j                            t          j                            |                    \  }}t          j        |          }t!          j        d|          }d |D             }|                     ||           d S )Ni  r   NFDc                 8    g | ]}t          j        d |          S )r   )unicodedata	normalize).0fs     r   
<listcomp>z/TestUnicodeFiles._do_single.<locals>.<listcomp>4   s%    HHH[*5!44HHHr   )
assertTruer
   r   r   isfileaccessR_OKabspathchmodutimetime_do_copyishglobescapesplitlistdirr   r   assertIn)selfr   r   base	file_lists        r   
_do_singlezTestUnicodeFiles._do_single   s   x00111x00111	(BG44555rwx'@'@AABBBrwx'@'@AABBB	"'//(";";RWEEFFF
5!!!
4   
DIKK56668,,,GOOH%%rwtyXAVAV7W7WXY7Z'['[[	] 	] 	] W]]27??8#<#<==
dJt$$	 $UD11HHiHHH	
dI&&&&&r   c                    |                      t          j                            |                     t          j        ||dz              |                     t          j                            |                     |                      t          j                            |dz                        t          j        |dz   |           |                     t          j                            |dz                        |                      t          j                            |                     t
          j        ||dz              t          j        |dz              t
          j	        ||dz              |                     t          j        
                    |                     |                      t          j        
                    |dz                        t
          j	        |dz   |           |                     t          j        
                    |dz                        |                      t          j        
                    |                     t
          j        ||dz              |                      t          j                            |dz                        t          j        |dz              |                     t          j        
                    |dz                        d S )Nz.new)r   r
   r   r   renameassertFalseshutilcopyr
   mover   copy2)r*   	filename1	filename2s      r   r$   zTestUnicodeFiles._do_copyish9   sF   y11222
	)Y/000	22333y6'9::;;;
	)f$i000	F(:;;<<<y11222Iy61222
	)f$%%%Iy61222	22333y6'9::;;;I&	222	F(:;;<<<y11222 	Y	F 2333y6'9::;;;
	)f$%%%	F(:;;<<<<<r   c                    t           j                            |          rt          |           t          j        |           	 t          |          5  t          j                    }|}t          j        d|          }t          j        d|          }| 	                    t           j        
                    |          |           d d d            n# 1 swxY w Y   t          j        |           d S # t          j        |           w xY w)Nr   )r
   r   isdirr   mkdirr   getcwdr   r   assertEqualbasenamermdir)r*   	make_name
chdir_name
cwd_resultname_results        r   
_do_directoryzTestUnicodeFiles._do_directoryV   s7   
7==## 	9
	 J''