+
    h*                         R t ^ RIt^ RIt^ RIt^ RIHtHt ^ RIHt ^ RI	H
t
HtHt ^ RIt^ RIt^RIHt RtR t ! R R	4      t ! R
 R4      tR# )zTests for distutils.filelist.N)debugfilelist)DistutilsTemplateError)FileList
glob_to_retranslate_pattern)py39zinclude ok
include xo
exclude xo
include foo.tmp
include buildout.cfg
global-include *.x
global-include *.txt
global-exclude *.tmp
recursive-include f *.oo
recursive-exclude global *.x
graft dir
prune dir3
c                B    V P                  R\        P                  4      # )z"Converts '/' in a string to os.sep/)replaceossep)ss   &K/usr/lib/python3/dist-packages/setuptools/_distutils/tests/test_filelist.pymake_local_pathr      s    99S"&&!!    c                   b   a  ] tR t^$t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tRtV tR# )TestFileListc                    VP                    Uu. uF%  q"P                  \        P                  8X  g   K#  VNK'  	  ppV'       d   Q hVP	                  4        R # u upi NrecordslevelnologgingWARNINGclearselfcaplogrecwarningss   &&  r   assertNoWarningsTestFileList.assertNoWarnings%   s@    #)>>T>C[[GOO5SCC>T| U
    AAc                    VP                    Uu. uF%  q"P                  \        P                  8X  g   K#  VNK'  	  ppV'       g   Q hVP	                  4        R # u upi r   r   r   s   &&  r   assertWarningsTestFileList.assertWarnings*   s?    #)>>T>C[[GOO5SCC>Tx Ur#   c                    \         P                  p\         P                  R 8X  d%   \        P                  ! \         P                  4      pR F"  w  r#VRV/,          p\	        V4      V8X  d   K"  Q h	  R# )\r   N))zfoo*z(?s:foo[^%(sep)s]*)\Z)zfoo?z(?s:foo[^%(sep)s])\Z)zfoo??z(?s:foo[^%(sep)s][^%(sep)s])\Z)zfoo\\*z(?s:foo\\\\[^%(sep)s]*)\Z)zfoo\\\*z(?s:foo\\\\\\[^%(sep)s]*)\Z)zfoo????z2(?s:foo[^%(sep)s][^%(sep)s][^%(sep)s][^%(sep)s])\Z)zfoo\\??z"(?s:foo\\\\[^%(sep)s][^%(sep)s])\Z)r   r   reescaper   )r   r   globregexs   &   r   test_glob_to_reTestFileList.test_glob_to_re/   sY    ff66T>))BFF#C

KD UCL(Ed#u,,,

r   c                   \        4       p\        pR RRRRV! R4      V! R4      V! R4      V! R4      V! R	4      V! R
4      V! R4      V! R4      V! R4      V! R4      .Vn        \        P	                  R4       F+  pVP                  4       R8X  d   K  VP                  V4       K-  	  RRRV! R4      V! R4      V! R4      V! R
4      V! R4      V! R4      .	pVP                  V8X  g   Q hR# )zfoo.tmpokxozfour.txtzbuildout.cfgz.hg/last-message.txtzglobal/one.txtzglobal/two.txtzglobal/files.xzglobal/here.tmpzf/o/f.oozdir/graft-onezdir/dir2/graft2zdir3/okzdir3/sub/ok.txt
 N)r   r   allfilesMANIFEST_INsplitstripprocess_template_linefiles)r   	file_listmlplinewanteds   &    r   test_process_template_line'TestFileList.test_process_template_lineB   s   J	  &' ! ! !!"
O !"	N!"#
	(  %%d+Dzz|r!++D1 , &' ! !
O !"

 &(((r   c                   \        4       pVP                  R 4       VP                  4       P                  R8X  g   Q hVP	                  \
        RR4       VP                  R 4       VP                  4       P                  R8X  g   Q hR# )xxxr3   DEBUGTzxxx
N)r   debug_print
readouterroutsetattrr   )r   capsysmonkeypatchr:   s   &&& r   test_debug_printTestFileList.test_debug_printo   sq    J	e$  "&&",,,E7D1e$  "&&'111r   c                j    \        4       p. ROpVP                  V4       VP                  V8X  g   Q hR# )aN)rL   bc)r   set_allfilesr4   )r   r:   r9   s   &  r   test_set_allfilesTestFileList.test_set_allfilesx   s0    J	u%!!U***r   c                    \        4       p. ROVn        VP                  4        VP                  4        VP                  . RO8X  g   Q hR# )rL   N)rL   rM   rL   grN   rS   )rL   rM   rN   rS   )r   r9   sortremove_duplicatesr   r:   s   & r   test_remove_duplicates#TestFileList.test_remove_duplicates~   s9    J	8	##%"6666r   c                &   \        \        R RRR7      R4      '       g   Q h\        P                  ! R 4      p\        VRRR7      V8X  g   Q h\        \        R RRR7      R4      '       g   Q h\        RRRR7      P	                  R4      '       g   Q hR# )rL   TF)anchoris_regexsearch*.pyzfilelist.pyN)hasattrr   r)   compiler\   )r   r,   s   & r   test_translate_pattern#TestFileList.test_translate_pattern   s    (TEJHUUUU 

3 tdCuLLL (TDI8TTTT !uELL
 
 	
 
r   c                   \        4       pVP                  R 4      '       d   Q h\        4       pRR.Vn        VP                  R 4      '       g   Q h\        4       pRR.Vn        VP                  R 4       VP                  R.8X  g   Q hR# )r]   a.pyzb.pyza.txtN)r   exclude_patternr9   rV   s   & r   test_exclude_pattern!TestFileList.test_exclude_pattern   s    J	,,V4444 J	!6*	((0000 J	!7+	!!&)7)+++r   c                   \        4       pVP                  . 4       VP                  R 4      '       d   Q h\        4       pVP                  RR.4       VP                  R 4      '       g   Q h\        4       pVP                  e   Q hVP                  RR.4       VP                  R4       VP                  RR.8X  g   Q hR# )r]   rc   b.txtN*)r   rO   include_patternr4   rV   s   & r   test_include_pattern!TestFileList.test_include_pattern   s    J	r",,V4444 J	01((0000 J	!!)))01!!#&!!fg%6666r   c                
   \         p\        4       pR F?  p\        P                  ! \        4      ;_uu_ 4        VP                  V4       RRR4       KA  	  \        4       pVP                  RRV! R4      .4       VP                  R4       VP                  R.8X  g   Q hV P                  V4       VP                  R4       VP                  R.8X  g   Q hV P                  V4       \        4       pRRV! R4      .Vn        VP                  R4       VP                  RV! R4      .8X  g   Q hV P                  V4       VP                  R4       VP                  RV! R4      .8X  g   Q hV P                  V4       \        4       pVP                  RRV! R4      .4       VP                  R	4       VP                  RV! R4      .8X  g   Q hV P                  V4       VP                  R
4       VP                  RV! R4      .8X  g   Q hV P                  V4       \        4       pRRV! R4      .Vn        VP                  R4       VP                  R.8X  g   Q hV P                  V4       VP                  R4       VP                  R.8X  g   Q hV P                  V4       \        4       pVP                  RV! R4      V! R4      V! R4      .4       VP                  R4       VP                  V! R4      V! R4      .8X  g   Q hV P                  V4       VP                  R4       VP                  V! R4      V! R4      .8X  g   Q hV P                  V4       \        4       pRV! R4      V! R4      V! R4      .Vn        VP                  R4       VP                  RV! R4      .8X  g   Q hV P                  V4       VP                  R4       VP                  RV! R4      .8X  g   Q hV P                  V4       \        4       pVP                  RV! R4      V! R4      V! R4      .4       VP                  R4       VP                  V! R4      V! R4      .8X  g   Q hV P                  V4       VP                  R4       VP                  V! R4      V! R4      .8X  g   Q hV P                  V4       \        4       pRV! R4      V! R4      V! R4      .Vn        VP                  R4       VP                  RV! R4      .8X  g   Q hV P                  V4       VP                  R4       VP                  RV! R4      .8X  g   Q hV P                  V4       R#   + '       g   i     EKO  ; i)includeNrc   rh   zd/c.pyzinclude *.pyzinclude *.rbzexclude *.pyzexclude *.rbzglobal-include *.pyzglobal-include *.rbzglobal-exclude *.pyzglobal-exclude *.rbzd/b.pyzd/c.txtzd/d/e.pyzrecursive-include d *.pyzrecursive-include e *.pyzrecursive-exclude d *.pyzrecursive-exclude e *.pyzf/f.pyzgraft dzgraft ezprune dzprune e)	rn   excludezglobal-includezglobal-excludezrecursive-includezrecursive-excludegraftpruneblarg)
r   r   pytestraisesr   r8   rO   r9   r!   r%   )r   r   r;   r:   actions   &&   r   test_process_template"TestFileList.test_process_template   s   J	

F 566//7 76

 J	X?@''76(***f%''76(***F# J	!7CM:	''77CM"::::f%''77CM"::::F# J	X?@''(=>63x="9999f%''(=>63x="9999F# J	!7CM:	''(=>7)+++f%''(=>7)+++F# J	Hs9~s:WX''(BC3x=#j/"BBBBf%''(BC3x=#j/"BBBBF# J	!3x=#i.#j/R	''(BC63y>"::::f%''(BC63y>"::::F# J	Hs:HVW''	23x=#j/"BBBBf%''	23x=#j/"BBBBF# J	!3x=#j/3x=Q	''	263x="9999f%''	263x="9999F#C 766s   UU" N)__name__
__module____qualname____firstlineno__r!   r%   r-   r>   rI   rP   rW   r`   re   rk   rv   __static_attributes____classdictcell____classdict__s   @r   r   r   $   sD     

-&+)Z2+7
 , 7$p$ p$r   r   c                   t   a  ] tR tRt o ]P
                  R 4       tR tR t]P
                  R 4       t	Rt
V tR# )TestFindAlli+  c                l    \         P                  ! R R4       \        P                  ! 4       . 8X  g   Q hR# )foobarN)r   symlinkr   findall)r   temp_cwds   &&r   test_missing_symlink TestFindAll.test_missing_symlink,  s'    


5% !R'''r   c                $   \         P                  P                  RRR/RRR//4       \        P                  P	                  RR4      p\        P                  P	                  RR4      pW2.p\        \        P                  ! 4       4      V8X  g   Q hR# )zu
When findall is called with no parameters or with
'.' as the parameter, the dot should be omitted from
the results.
r   	file1.txtr3   r   z	file2.txtN)jaracopathbuildr   joinsortedr   r   )r   r   file1file2expecteds   &&   r   test_basic_discovery TestFindAll.test_basic_discovery1  st     	5;"3U["<MNOUK0UK0>h&&()X555r   c                    \         P                  P                  RR/V4       \        VR,          4      .p\        P
                  ! V4      V8X  g   Q hR# )zR
When findall is called with another path, the full
path name should be returned.
r   r3   N)r   r   r   strr   r   )r   tmp_pathr   s   && r   test_non_local_discovery$TestFindAll.test_non_local_discovery=  sH    
 	;+X6;./0)X555r   c                    \         P                  P                  R \         P                  P                  R4      RR/V4       \        P
                  ! V4      p\        V4      ^8X  g   Q hR# )zlink-to-parent.somefiler3   N)r   r   r   Symlinkr   r   len)r   r   r9   s   && r   test_symlink_loopTestFindAll.test_symlink_loopF  sY     &++"5"5c":B 	
   *5zQr   rx   N)ry   rz   r{   r|   	os_helperskip_unless_symlinkr   r   r   r   r}   r~   r   s   @r   r   r   +  sA     ""( #(
66 ""	 #	r   r   )__doc__r   r   r)   	distutilsr   r   distutils.errorsr   distutils.filelistr   r   r   jaraco.pathr   rs   compatr   r   r5   r   r   r   rx   r   r   <module>r      sI    #  	 	 % 3 F F   % "
D$ D$N% %r   