+
    =i                         R t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHtH	t	 ^ RI
HtHtHtHtHt ^ RIHt ^ RIt^ RIt^ RIt]P,                  ! RR7      R 4       t ! R R	]P0                  4      tR# )
zTests for distutils.dir_util.N)dir_utilerrors)	copy_treecreate_treeensure_relativemkpathremove_tree)supportT)autousec                 0   V P                   pVP                  4       p\        P                  P	                  VR 4      Vn        \        P                  P	                  VP
                  R4      Vn        \        P                  P	                  VR4      Vn        R# )deepheredeep2N)instancemkdtempospathjoinroot_targettargettarget2)requestmonkeypatchdistutils_managed_tempdirselftmp_dirs   &&&  Ilib/python3.14/site-packages/setuptools/_distutils/tests/test_dir_util.pystuffr      sa    DllnGww||GV4D'',,t//8DK77<<1DL    c                      a  ] tR t^ t o R t]P                  P                  R4      R 4       tR t	R t
R tR tR tR	 tR
tV tR# )TestDirUtilc                   \        V P                  R R7       VP                  '       d   Q h\        V P                  R R7       \        V P                  RR7       RV P                   2.pVP
                  V8X  g   Q hVP                  4        \        V P                  RR7       RV P                   R2.pVP
                  V8X  g   Q hR# )FverboseT	creating z
removing 'z' (and everything under it)N)r   r   recordsr   r   messagesclearr   caplogwanteds   && r   !test_mkpath_remove_tree_verbosity-TestDirUtil.test_mkpath_remove_tree_verbosity!   s    t{{E*>>>!!D$$e4t{{D)dkk]+,&(((D$$d3t//00KLM&(((r   zplatform.system() == 'Windows'c                   \         P                  ! ^4      p\         P                  ! V4       \        V P                  R4       \        P
                  ! \         P                  ! V P                  4      P                  4      RV( ,          8X  g   Q h\        V P                  R4       \        P
                  ! \         P                  ! V P                  4      P                  4      RV( ,          8X  g   Q hR# )   i  im  N)r   umaskr   r   statS_IMODEst_moder   )r   r/   s   & r   test_mkpath_with_custom_mode(TestDirUtil.test_mkpath_with_custom_mode/   s     
t{{E"||BGGDKK0889UeV^KKKt||U#||BGGDLL199:eufnLLLr   c                6   \        V P                  . RORR7       VP                  . 8X  g   Q h\        V P                  RR7       RV P                   2.p\        V P                  . RORR7       VP                  V8X  g   Q h\        V P                  RR7       R# )oneFr"   r$   TN)r6   twothree)r   r   r&   r   r(   s   && r   test_create_tree_verbosity&TestDirUtil.test_create_tree_verbosity9   s    D$$&=uM"$$$D$$e4d../01D$$&=tL&(((D$$e4r   c                   \        V P                  R R7       \        V P                  V P                  R R7       VP                  . 8X  g   Q h\        V P                  R R7       \        V P                  R R7       \        P                  ! V P                  4      R,          p\        P                  P                  RR/V P                  4       RV RV P                   2.p\        V P                  V P                  RR7       VP                  V8X  g   Q h\        V P                  R R7       \        V P                  R R7       R# )Fr"   ok.txtsome contentzcopying z -> TN)r   r   r   r   r&   r   r   r   Pathjaracobuild)r   r)   a_filer*   s   &&  r   test_copy_tree_verbosity$TestDirUtil.test_copy_tree_verbosityD   s    t{{E*$++t||U;"$$$D$$e4t{{E*4;;'(28^4dkkBVHD78$++t||T:&(((D$$e4DLL%0r   c                |   \        V P                  R R7       \        P                  P	                  RRRR/V P                  4       \        V P                  V P                  4       \        P                  ! V P                  4      R.8X  g   Q h\        V P                  R R7       \        V P                  R R7       R# )Fr"   r<   r=   z
.nfs123abc N)r   r   r?   r   r@   r   r   r   listdirr   r   r   s   &r   #test_copy_tree_skips_nfs_temp_files/TestDirUtil.test_copy_tree_skips_nfs_temp_filesW   s~    t{{E*8^\2FT$++t||,zz$,,'H:555D$$e4DLL%0r   c                    \         P                  R 8X  d'   \        R4      R8X  g   Q h\        R4      R8X  g   Q hR# \        R4      R8X  g   Q h\        R4      R8X  g   Q hR# )/z	/home/foozhome/fooz	some/pathzc:\home\fooz
c:home\foozhome\fooN)r   sepr   rG   s   &r   test_ensure_relative TestDirUtil.test_ensure_relativeb   sY    66S=";/:===";/;>>>"?3}DDD";/;>>>r   c           	     t   \         P                  ! R\        4       R7      ;_uu_ 4        \        P                  ! \
        P                  4      ;_uu_ 4        V P                  R,          p\        P                  ! VR4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)z;
An exception in listdir should raise a DistutilsFileError
z
os.listdir)side_effectN)
mockpatchOSErrorpytestraisesr   DistutilsFileErrortempdirsr   r   )r   srcs   & r   #test_copy_tree_exception_in_listdir/TestDirUtil.test_copy_tree_exception_in_listdirj   sj    
 JJ|;;MM&3344--#CsD) 5 <;44 <;;s#   -B&+B	B&B#B&&B7	c                r    ! R R\         P                  4      pVR,          p\        P                  ! \        P
                  4      ;_uu_ 4        \        V! V4      4       RRR4       VP                  4       '       d   Q h\        V4       VP                  4       '       g   Q hR#   + '       g   i     LM; i)zB
Caching should not remember failed attempts.

pypa/distutils#304
c                      a  ] tR t^|t o R t]P                  R8  d"   ]P                  ! 4       P                  t	Rt
V tR# Rt
V tR# )<TestDirUtil.test_mkpath_exception_uncached.<locals>.FailPathc                    \        R 4      h)zFailed to create directory)rT   )r   argskwargss   &*,r   mkdirBTestDirUtil.test_mkpath_exception_uncached.<locals>.FailPath.mkdir}   s    :;;r    N)      )__name__
__module____qualname____firstlineno__rb   sysversion_infopathlibr>   _flavour__static_attributes____classdictcell____classdict__s   @r   FailPathr^   |   s0     < ')"<<>22 *r   rs   foodirN)rm   r>   rU   rV   r   rW   r   exists)r   r   tmp_pathrs   r   s   &&&  r   test_mkpath_exception_uncached*TestDirUtil.test_mkpath_exception_uncachedu   sx    	3w|| 	3 H$]]644558F#$ 6 ==??""v}} 65s   B&&B6	rd   N)rg   rh   ri   rj   r+   rU   markskipifr3   r9   rB   rH   rM   rZ   rw   ro   rp   rq   s   @r   r    r        sS     ) [[89M :M	51&	1?	* r   r    )__doc__r   rm   r0   rk   unittest.mockrR   	distutilsr   r   distutils.dir_utilr   r   r   r   r   distutils.testsr	   jaraco.pathr?   r   rU   fixturer   TempdirManagerr    rd   r   r   <module>r      sc    # 	   
  &  $    2 2k'(( kr   