+
    BinR                    ,   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHtHtHt ^ RIHt ^ RIHt ^ R	IHtHtHt  ^ RIt ^ RIt^ RI t  ^ RI!t!R
t"]#! ]R4      '       d   ]PH                  ! 4       ^ 8H  t"R t%]&! 4       t']&! 4       t(]&! 4       t)R t*R t+R t, ! R R]PZ                  4      t. ! R R]PZ                  4      t/ ! R R]PZ                  4      t0 ! R R]04      t1 ! R R]04      t2 ! R R]04      t3 ! R R]04      t4 ! R R]PZ                  4      t5]Pl                  ! ]Pn                  R 8H  R!4       ! R" R#]4]14      4       t8]Pl                  ! ]Pn                  R 8g  R$4       ! R% R&]4]24      4       t9 ! R' R(]44      t: ! R) R*]PZ                  4      t;]<R+8X  d   ]Pz                  ! 4        R# R#   ] d    Rt ELzi ; i  ] d	    R;tt  ELi ; i  ] d    Rt! ELi ; i),    N)mock)pathname2url)import_helper)cpython_only)is_emscriptenis_wasi	is_wasm32)infinite_recursion)	os_helper)TESTFNFS_NONASCIIFakePathFgeteuidc                    a a R  oVV 3R lpV# )c                 8    \        \        P                  R W4      h)zCross-device link)OSErrorerrnoEXDEV)selftargets   &&5/usr/lib/python3.14/test/test_pathlib/test_pathlib.pynew_replace"patch_replace.<locals>.new_replace,   s    ekk#6EE    c                    < V P                   P                  pSV P                   n         S! V 4       WP                   n        R #   YP                   n        i ; iN)clsreplace)r   old_replacer   old_tests   & r   new_testpatch_replace.<locals>.new_test/   s?    hh&&&	+TN*HH{HHs   A A )r    r!   r   s   f @r   patch_replacer$   +   s    F+ Or   c                 D    \         P                  V P                  4       V # r   )_tests_needing_posixadd__name__fns   &r   needs_posixr+   =   s    R[[)Ir   c                 D    \         P                  V P                  4       V # r   )_tests_needing_windowsr'   r(   r)   s   &r   needs_windowsr.   B   s    r{{+Ir   c                 D    \         P                  V P                  4       V # r   )_tests_needing_symlinksr'   r(   r)   s   &r   needs_symlinksr1   G   s    ,Ir   c                   &   a  ] tR t^Nt o R tRtV tR# )UnsupportedOperationTestc                    V P                  \        P                  \        4       V P	                  \        P                  ! 4       \        4       R # r   )assertIsSubclasspathlibUnsupportedOperationNotImplementedErrorassertIsInstancer   s   &r   test_is_notimplemented/UnsupportedOperationTest.test_is_notimplementedO   s3    g::<OPg::<>QRr   r#   N)r(   
__module____qualname____firstlineno__r;   __static_attributes____classdictcell____classdict__s   @r   r3   r3   N   s     S Sr   r3   c                   0   a  ] tR t^Tt o ]R 4       tRtV tR# )LazyImportTestc                6    \         P                  ! R R04       R# )r6   shutilN)r   ensure_lazy_importsr:   s   &r   test_lazy_importLazyImportTest.test_lazy_importU   s    )))hZ@r   r#   N)r(   r=   r>   r?   r   rI   r@   rA   rB   s   @r   rE   rE   T   s     A Ar   rE   c                     a  ] tR t^^t o ]P
                  t]P                  P                  ]
4      tR. RJOR. RKO/tR tR tR t]R 4       tR tR t]R	 4       tR
 tR tR tR tR t]R 4       tR tR tR tR tR tR t R t!R t"R t#R t$R t%R t&R t'RLR lt(R t)R  t*R! t+R" t,R# t-]R$ 4       t.R% t/]0R& 4       t1]R' 4       t2R( t3R) t4]R* 4       t5R+ t6]R, 4       t7R- t8R. t9R/ t:R0 t;R1 t<]0R2 4       t=]R3 4       t>]0R4 4       t?]0R5 4       t@]0R6 4       tA]0R7 4       tB]0R8 4       tCR9RM.R:. RNOR;. ROOR<RP.R=RQRR./tD]R> 4       tE]R? 4       tF]R@ 4       tG]RA 4       tH]RB 4       tI]0RC 4       tJ]RD 4       tKRE tL]RF 4       tMRG tN]RH 4       tORItPV tQR# )SPurePathTesta/b/b/c/dc                   V P                  4       P                  R 4      R,          pV\        9   d0   V P                  P                  \
        Jd   V P                  R4       V\        9   d0   V P                  P                  \
        J d   V P                  R4       V P                  R4      pVP                  V n        V P                  P                  V n        V P                  P                  V n	        R# ).z#requires POSIX-flavoured path classz%requires Windows-flavoured path classaN)
idsplitr&   r   parser	posixpathskipTestr-   sepaltsep)r   nameps   &  r   setUpPurePathTest.setUpt   s    wwys#B'''DHHOO9,LMM?@))dhhoo.JMMABHHSMhh;;??kk((r   c                   a  ! R  R\         4      oV P                  pV! V3R lV 4       !  pV P                  W2! V!  4       VP                   F"  pV P	                  \        V4      \         4       K$  	  R# )c                       ] tR t^tRtR# )5PurePathTest._check_str_subclass.<locals>.StrSubclassr#   Nr(   r=   r>   r?   r@   r#   r   r   StrSubclassr`      s    r   rb   c              3   4   <"   T F  pS! V4      x  K  	  R # 5ir   r#   ).0xrb   s   & r   	<genexpr>3PurePathTest._check_str_subclass.<locals>.<genexpr>   s     -1As   N)strr   assertEqualpartsassertIstype)r   argsPr[   partrb   s   &*   @r   _check_str_subclass PurePathTest._check_str_subclass   s\    	# 	HH--.AtH%GGDMM$t*c* r   c                    V P                  R 4       V P                  R4       V P                  R4       V P                  R4       V P                  R4       R# ) rP   rQ   za/b.txtz/a/b.txtNrp   r:   s   &r   test_str_subclass_common%PurePathTest.test_str_subclass_common   sH      $  %  %  +  ,r   c                Z   V P                  R 4       V P                  R4       V P                  R4       V P                  R4       V P                  R4       V P                  R4       V P                  R4       V P                  R4       V P                  R4       V P                  R	4       R
# )z.\a:bc:c:az	c:a\b.txtc:\c:\az
c:\a\b.txtz\\some\sharez\\some\share\az\\some\share\a\b.txtNrt   r:   s   &r   test_str_subclass_windows&PurePathTest.test_str_subclass_windows   s      *  &  '  .  (  )  0  !23  !56  !<=r   c                    V P                   ! V!  pV P                  \        V4      VP                  R V P                  4      4       R# /N)r   ri   rh   r   rX   )r   expectedrm   r[   s   &&& r   
_check_strPurePathTest._check_str   s4    HHdOQ!1!1#txx!@Ar   c                <    R F  pV P                  W34       K  	  R# rQ   NrQ   rM   a/b/cr   /a/b/a/b/c)r   )r   pathstrs   & r   test_str_commonPurePathTest.test_str_common   s    CGOOGZ0 Dr   c                   V P                  R 4      pV P                  \        V4      R4       V P                  R4      pV P                  \        V4      R4       V P                  R4      pV P                  \        V4      R4       V P                  R4      pV P                  \        V4      R4       V P                  R4      pV P                  \        V4      R	4       R
# )r   za\b\czc:/a/b/czc:\a\b\c//a/bz\\a\b\//a/b/cz\\a\b\c	//a/b/c/dz	\\a\b\c\dN)r   ri   rh   r   r[   s   & r   test_str_windowsPurePathTest.test_str_windows   s    HHWQ+HHZ Q/HHWQ.HHYQ/HH[!Q!12r   c                   V P                   \        P                  J d7   \        P                  R 8X  d   \        P
                  M\        P                  pMV P                   pV P                  R4      pV P                  \        V4      V4       R# ntrQ   N)	r   r6   PurePathosrZ   PureWindowsPathPurePosixPathrk   rl   r   r   r[   s   &  r   test_concrete_class PurePathTest.test_concrete_class   sY    88w'''24''T/w..wG\G\HxxHHHSMd1gx(r   c                   V P                   \        P                  J d   \        pM5V P                   \        P                  J d   \
        pM\        P                  pV P                  R 4      pV P                  VP                  V4       R# rQ   N)
r   r6   r   rV   r   ntpathr   pathrk   rU   r   s   &  r   test_concrete_parser!PurePathTest.test_concrete_parser   sX    88w,,, HXX000HwwHHHSMahh)r   c                    V P                  R 4      pVP                  \        J d   \        P                  ! R 4      pM\        P
                  ! R 4      pV P                  W4       R# r   )r   rU   rV   r6   r   r   assertNotEqualr   r[   qs   &  r   test_different_parsers_unequal+PurePathTest.test_different_parsers_unequal   sI    HHSM88y '',A%%c*AA!r   c                   V P                  R 4      pVP                  \        J d   \        P                  ! R 4      pM\        P
                  ! R 4      pV P                  \        4      ;_uu_ 4        W8   RRR4       V P                  \        4      ;_uu_ 4        W8*   RRR4       V P                  \        4      ;_uu_ 4        W8   RRR4       V P                  \        4      ;_uu_ 4        W8   RRR4       R#   + '       g   i     L; i  + '       g   i     Ly; i  + '       g   i     Lb; i  + '       g   i     R# ; ir   )r   rU   rV   r6   r   r   assertRaises	TypeErrorr   s   &  r    test_different_parsers_unordered-PurePathTest.test_different_parsers_unordered   s    HHSM88y '',A%%c*Ay))E *y))F *y))E *y))F *) *))))))))s0   0C=DD#.D6=D	D 	#D3	6E	c           	        V P                   pV! \        R 4      4       V P                  V! V! R4      4      V! R4      4       V P                  V! V! R4      R4      V! R4      4       V P                  V! V! R4      V! R4      4      V! R4      4       V P                  V! V! R4      V! R4      V! R4      4      V! \        R 4      4      4       V P                  V! V! R4      4      V! R4      4       R# )r   rQ   brM   c./a:bN)r   r   ri   r   rn   s   & r   test_constructor_nested$PurePathTest.test_constructor_nested   s    HH	(7
1S6AcF+1S63521S61S6*AeH51S61S61S62Ahw6G4HI1W:'
3r   c                B   \         P                  ! R 4      p\         P                  ! RR4      pV P                  W4       V P                  V P                  V4      V P                  R4      4       V P                  V P                  V4      V P                  R4      4       R# )zb/c:\db/zc:\dzb/c:/dN)r6   r   ri   r   )r   p1p2s   &  r   'test_constructor_nested_foreign_flavour4PurePathTest.test_constructor_nested_foreign_flavour   sv     ""9-""41 "txx'9:"txx'9:r   c                b   V P                   P                  pV P                  P                  VP	                  R V4      4      pV P                  WB4       V P                   P                  ;p'       d?   V P                  P                  VP	                  R V4      4      pV P                  WB4       R# R# r   )rU   rX   r   _parse_pathr   ri   rY   )r   raw_pathr   rX   actualrY   s   &&*   r   _check_parse_pathPurePathTest._check_parse_path   s    kkoo%%h&6&6sC&@A*[['''6'XX))(*:*:3*GHFV. (r   c                   V P                   pV P                  P                  pV! R R R . 4       V! RR R R.4       V! RR R R.4       V! RR R RR.4       V! RR R RR.4       V! RR R . RO4       V! RR R . RO4       V! RR R . RO4       V! RR R . 4       V! R	R R R.4       V! R
R R RR.4       V! RR R R.4       V! RR VRR.4       R# )rs   rQ   a/rM   r   a/b/za/b/c/dza/b//c/drP   z././bza/./bza/./.r   N)rQ   r   r   d)r   rU   rX   )r   checkrX   s   &  r   test_parse_path_common#PurePathTest.test_parse_path_common   s    &&kkoob"b"%c"b3%(d"b3%(e"b3*-f"b3*-i"b"67j"b"67i"b"67c"b"%g"b3%(g"b3*-g"b3%(f"cC:.r   c                    V P                  R 4      pV P                  \        V4      R4       V P                  RR4       R# )rs   rP   N)rs   )r   ri   rh   r   r   s   & r   test_empty_pathPurePathTest.test_empty_path
  s1    HHRLQ%U#r   c                    V P                   pV! R 4      P                  V! R4      4      pV P                  W!! R4      4       R# rM   r   r   N)r   joinpathri   r   rn   r[   s   &  r   test_join_nestedPurePathTest.test_join_nested  s7    HHeHaf%AgJ'r   c                v    V P                   pV! R 4      V! R4      ,          pV P                  W!! R4      4       R# r   )r   ri   r   s   &  r   test_div_nestedPurePathTest.test_div_nested  s1    HHeHqvAgJ'r   c           
     Z   V P                   pR EF  pV P                  VR7      ;_uu_ 4        V! V4      p\        ^ \        P                  ^,           4       F  p\        P
                  ! W44      p\        P                  ! V4      pV P                  VP                  VP                  4       V P                  Wc4       V P                  \        V4      \        V4      4       V P                  \        V4      \        V4      4       K  	  RRR4       EK  	  R#   + '       g   i     EK  ; i)rQ   r   N)rQ   r   rM   r   r   r   r   za/b/c/)r   subTestrangepickleHIGHEST_PROTOCOLdumpsloadsrk   	__class__ri   hashrh   )r   rn   r   r[   protodumpedpps   &      r   test_pickling_common!PurePathTest.test_pickling_common  s    HHSGg..gJ"1f&=&=&ABE#\\!3Ff-BMM",,<$$R+$$T"XtAw7$$SWc!f5 C /. T...s   CDD*c                   R F  pV P                  VR7      ;_uu_ 4        V P                  V4      pVP                  P                  p\	        V4      pV P                  WCR,           4       V P                  VR4       V\        V4      ^,           R pV P                  \        V4      VP                  4       4       RRR4       K  	  R#   + '       g   i     K  ; i)rQ   r   ()Nr   rR   )r   r   r   r(   reprassertStartsWithassertEndsWithlenri   evalas_posix)r   r   r[   clsnamerinners   &     r   test_repr_commonPurePathTest.test_repr_common(  s    CGg..HHW%++..G%%a37##As+#g,*R0  eajjl; /. D...s   BC		Cc                    V P                   pV! R 4      pV P                  VP                  4       R4       V P                  \        P                  ! V4      R4       R# )rM   N)rM   )r   r   
__fspath__r   fspathr   s   &  r   test_fspath_commonPurePathTest.test_fspath_common4  s>    HHeH1		!h/r   c                   V P                   pV P                  \        4      ;_uu_ 4        V! R 4       RRR4       V P                  \        4      ;_uu_ 4        V! R R4       RRR4       V P                  \        4      ;_uu_ 4        V! RR4       RRR4       V P                  \        4      ;_uu_ 4        V! R4      P                  R4       RRR4       V P                  \        4      ;_uu_ 4        V! R4      R,           RRR4       V P                  \        4      ;_uu_ 4        R V! R4      ,           RRR4       V P                  \        4      ;_uu_ 4        V! R4      P	                  R4       RRR4       V P                  \        4      ;_uu_ 4        V! R4      P                  R4       RRR4       V P                  \        4      ;_uu_ 4        V! R4      P                  R4       RRR4       V P                  \        4      ;_uu_ 4        V! R4      P                  R4       RRR4       V P                  \        4      ;_uu_ 4        V! R4      P                  R4       RRR4       R#   + '       g   i     ELI; i  + '       g   i     EL.; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELV; i  + '       g   i     EL-; i  + '       g   i     EL; i  + '       g   i     R# ; i)   aNr   rQ      b)	r   r   r   r   matchrelative_to	with_name	with_stemwith_suffixr   s   & r   
test_bytesPurePathTest.test_bytes:  s   HHy))dG *y))dCL *y))c4L *y))cFOOD! *y))cFTM *y))1S6M *y))cFLL *y))cFt$ *y))cFT" *y))cFT" *y))cFt$ *)) *))))))))))))))))))))))))))))))))s   	I3
J
J6J/3K(KK+K?LL'L;3J	J	J,	/K 	K	K(	+K<	?L	L$	'L8	;M	c                   V P                   pR pV P                  \        V4      ;_uu_ 4        V! R4       RRR4       V P                  \        V4      ;_uu_ 4        V! RR4       RRR4       V P                  \        V4      ;_uu_ 4        V! RR4       RRR4       R#   + '       g   i     Lr; i  + '       g   i     LU; i  + '       g   i     R# ; i)z^argument should be a str or an os\.PathLike object where __fspath__ returns a str, not 'bytes'r   Nr   rQ   r   )r   assertRaisesRegexr   )r   rn   messages   &  r   test_bytes_exc_message#PurePathTest.test_bytes_exc_messageS  s    HHB##Iw77dG 8##Iw77dCL 8##Iw77c4L 87	 8777777s#   	B 
B3
C B0	3C	C	c                    \         P                  ! V P                  4      pV P                  pV P	                  \        V! R 4      4      RV,           R,           4       R# )rM   r   r   N)r   fsencoderX   r   ri   bytes)r   rX   rn   s   &  r   test_as_bytes_common!PurePathTest.test_as_bytes_common^  s>    kk$((#HHqx$*t*;<r   c                |    V P                   pR F)  pV P                  V! V4      P                  4       V4       K+  	  R# r   )r   ri   r   )r   rn   r   s   &  r   test_as_posix_common!PurePathTest.test_as_posix_commonc  s3    HHCGQwZ002G< Dr   c                R   V P                   pV P                  V! R 4      V! R 4      4       V P                  V! R 4      V! RR4      4       V P                  V! R 4      V! R4      4       V P                  V! R 4      V! R4      4       V P                  V! R 4      V! 4       4       V P                  V! R4      V! R4      4       V P                  V! 4       V! R4      4       V P                  V! 4       R4       V P                  V! 4       / 4       V P                  V! 4       \        4       R# )rM   rQ   r   r   r   rs   N)r   ri   r   intr   s   & r   test_eq_commonPurePathTest.test_eq_commoni  s    HH51U8,51S#;/AeHaf-AeHai0AeHac*AfIqv.AC3(AC$AC$AC%r   Nc           	       a  Vf   S P                   pVP                  4        EFI  w  r#VP                  RS P                  4      pVP                  S P                  R4      pWE8w  d\   TV Uu. uF5  p\        ;QJ d    . V 3R lV 4       F  NK  	  5M! V 3R lV 4       4      NK7  	  up,           pVP                  V34       S P                  V4      pV F  pS P                  ! V!  pS P                  WRP                  V4      4       S P                  \        V4      \        V4      4       S P                  \        V4      V4       S P                  VP                  4       V4       K  	  EKL  	  R # u upi )Nr   c              3   Z   <"   T F   qP                  R SP                  4      x  K"  	  R# 5ir   )r   rX   )rd   ro   r   s   & r   rf   1PurePathTest.test_equivalences.<locals>.<genexpr>~  s!     D!$,,sDHH55!s   (+zfailed with args {})equivalencesitemsr   rX   tupleappendr   ri   formatr   rh   r   )	r   r  ktuplescanonposixtpcanonr[   s	   f&       r   test_equivalencesPurePathTest.test_equivalencesv  s+   ,,L%++-IAIIc488,EIIdhh,E~### ED!DEED!DD##  ui(XXe_FHHaL  ,A,H,H,KL  a$v,7  Q/  u5  .#s   +E2;+E2c                  a  V 3R  lpS P                   pV! R4      pV! R4      pV! R4      pV! R4      pV! W44       V! W54       V! W64       V! WE4       V! WV4       S P                   pV! R4      pV! R4      pV! R4      pV! R4      pV! W44       V! W54       V! W64       V! WE4       V! WV4       S P                  \        4      ;_uu_ 4        V! 4       / 8   R	R	R	4       R	#   + '       g   i     R	# ; i)
c                 L   < SP                  W4       SP                  W4       R # r   )
assertLessassertGreaterrQ   r   r   s   &&r   r$  5PurePathTest.test_ordering_common.<locals>.assertLess  s    OOA!q$r   rQ   rM   abcr   /ar   z/abcz/bN)r   r   r   )r   r$  rn   rQ   r   r   r   s   f      r   test_ordering_common!PurePathTest.test_ordering_common  s    	% HHcFeHeHcF11111HHdGfIfIdG11111y))C"H *)))s   C""C3	c                    \        V\        P                  4      '       d   VP                  4       # V P	                  \
        4      ;_uu_ 4        VP                  4       uuR R R 4       #   + '       g   i     R # ; ir   )
isinstancer6   Pathas_uriassertWarnsDeprecationWarning)r   r   s   &&r   make_uriPurePathTest.make_uri  sI    dGLL));;= 011;;= 2111s   A))A:	c                ^   V P                   pV P                  \        4      ;_uu_ 4        V P                  V! R 4      4       RRR4       V P                  \        4      ;_uu_ 4        V P                  V! 4       4       RRR4       R#   + '       g   i     LN; i  + '       g   i     R# ; ir   )r   r   
ValueErrorr2  r   s   & r   test_as_uri_commonPurePathTest.test_as_uri_common  sk    HHz**MM!C&! +z**MM!# +* +****s   B'BB	B,	c                   R F  pV P                  VR7      ;_uu_ 4        V P                  V4      p\        V4      p\        V\        P
                  4      pV P                  VP                  VP                  4       V P                  WB4       V P                  \        V4      V4       RRR4       K  	  R#   + '       g   i     K  ; i)rQ   r   Nr   )	r   r   r   r   r6   __dict__rk   r   ri   )r   r   r[   r   r   s   &    r   test_repr_roundtrips!PurePathTest.test_repr_roundtrips  s    CGg..HHW%GG,,-akk1;;7  &  a!, /. D...s   B	B77Cc                    V P                   pV P                  V! R 4      P                  R4       V P                  V! R4      P                  R4       V P                  V! R4      P                  R4       R# )rM   rs   r   Nr   ri   driver   s   & r   test_drive_commonPurePathTest.test_drive_common  sS    HH5,6"-2b)r   c                >   V P                   pV P                  V! R 4      P                  R 4       V P                  V! R4      P                  R 4       V P                  V! R4      P                  R 4       V P                  V! R4      P                  R 4       V P                  V! R4      P                  R4       V P                  V! R4      P                  R4       V P                  V! R4      P                  R4       V P                  V! R4      P                  R	4       R
# )rx   c:a/bc:/c:/a/b/r   \\a\b//a/b/r   z./c:ars   Nr=  r   s   & r   test_drive_windowsPurePathTest.test_drive_windows  s    HH4-7))405.9++T27)):68**J7;--z:7))2.r   c                F   V P                   pV P                  pV P                  V! R 4      P                  R 4       V P                  V! R4      P                  R 4       V P                  V! R4      P                  V4       V P                  V! R4      P                  V4       R# )rs   rM   r   r   N)r   rX   ri   root)r   rn   rX   s   &  r   test_root_commonPurePathTest.test_root_common  st    HHhh2R(5+3c*6-r   c                    V P                   pV P                  V! R 4      P                  R4       V P                  V! R4      P                  R4       R# )r   r   r   //Nr   ri   rJ  r   s   & r   test_root_posixPurePathTest.test_root_posix  s;    HH6-7$/r   c                   V P                   pV P                  V! R 4      P                  R4       V P                  V! R4      P                  R4       V P                  V! R4      P                  R4       V P                  V! R4      P                  R4       V P                  V! R4      P                  R4       V P                  V! R4      P                  R4       V P                  V! R4      P                  R4       R	# )
rx   rs   rB  rC  \rD  r   rF  r   NrO  r   s   & r   test_root_windowsPurePathTest.test_root_windows  s    HH4r*7"-5-9**D17$/8))40;,,d3r   c                    V P                   pV P                  V! R 4      P                  R 4       V P                  V! R4      P                  R 4       V P                  V! R4      P                  R4       R# )rs   rP   z/a/b/.r   N)r   ri   rZ   r   s   & r   test_name_emptyPurePathTest.test_name_empty  sU    HH2R(3b)8))3/r   c                    V P                   pV P                  V! R 4      P                  R 4       V P                  V! R4      P                  R 4       R# )rs   rP   N)r   ri   stemr   s   & r   test_stem_emptyPurePathTest.test_stem_empty  s;    HH2R(3b)r   c                |   V P                   pV P                  \        V! R 4      P                  R4       V P                  \        V! R4      P                  R4       V P                  \        V! R4      P                  R4       V P	                  \        V! R4      P                  R4      4      R4       V P	                  \        V! R4      P                  R4      4      R4       V P	                  V! R	4      P                  R4      V! R
4      4       V P	                  V! R	4      P                  R4      V! R4      4       R# )rx   d.xmlzc:\\z
\\My\SharerQ   d:.\d:d:e.\d:ezc:a\bzc:a\d:zc:a\d:eN)r   r   r5  r   ri   rh   r   s   & r   test_with_name_windows#PurePathTest.test_with_name_windows  s    HH*ah&8&8'B*aj&:&:GD*a&6&@&@'JQsV--d34g>QsV--e45x@8..t4a	lC8..u5q}Er   c                   V P                   pV P                  \        V! R 4      P                  R4       V P                  \        V! R4      P                  R4       V P                  \        V! R4      P                  R4       V P                  \        V! R4      P                  R 4       V P                  \        V! R4      P                  R4       R# )rs   r^  rP   r   rM   N)r   r   r5  r   r   s   & r   test_with_name_empty!PurePathTest.test_with_name_empty  s    HH*aeoow?*af&6&6@*af&6&6@*ah&8&8"=*ah&8&8#>r   c                |   V P                   pV P                  \        V! R 4      P                  R4       V P                  \        V! R4      P                  R4       V P                  \        V! R4      P                  R4       V P	                  \        V! R4      P                  R4      4      R4       V P	                  \        V! R4      P                  R4      4      R4       V P	                  V! R	4      P                  R4      V! R
4      4       V P	                  V! R	4      P                  R4      V! R4      4       R# )rx   r   rC  z
//My/SharerQ   r_  r`  ra  rb  rB  zc:a/d:zc:a/d:eN)r   r   r5  r   ri   rh   r   s   & r   test_with_stem_windows#PurePathTest.test_with_stem_windows
  s    HH*ag&7&7=*ah&8&8#>*ao&?&?EQsV--d34g>QsV--e45x@7--d3Qx[A7--e4a	lCr   c                   V P                   pV P                  \        V! R 4      P                  R4       V P                  \        V! R4      P                  R4       V P                  \        V! R4      P                  R4       V P                  \        V! R4      P                  R 4       V P                  \        V! R4      P                  R4       R# )rs   r   rP   r   rM   N)r   r   r5  r   r   s   & r   test_with_stem_empty!PurePathTest.test_with_stem_empty  s    HH*aeoos;*af&6&6<*af&6&6<*ah&8&8"=*ah&8&8#>r   c                    V P                   pV! R 4      pV P                  \        4      ;_uu_ 4        VP                  4        RRR4       R#   + '       g   i     R# ; i)rM   N)r   r0  r1  is_reservedr   s   &  r   test_is_reserved_deprecated(PurePathTest.test_is_reserved_deprecated  s>    HHeH011MMO 2111s   AA	c                ^   V P                   pV P                  V! R 4      P                  RRR7      4       V P                  V! R 4      P                  RRR7      4       V P                  V! R4      P                  RRR7      4       V P                  V! R4      P                  RRR7      4       R	# )
A.pya.PYTcase_sensitiveF	c:/a/B.Py	C:/A/*.pY	/a/b/c.py	/A/*/*.PyN)r   assertFalse
full_match
assertTruer   s   & r   test_full_match_case_sensitive+PurePathTest.test_full_match_case_sensitive$  s    HH6--fT-JK&	,,VE,JK;22;t2TU+11+e1TUr   c                    V P                   pV P                  \        V! R 4      P                  R4       V P                  \        V! R 4      P                  R4       R# )rQ   rs   rP   N)r   r   r5  r   r   s   & r   test_match_emptyPurePathTest.test_match_empty+  s?    HH*afllB7*afllC8r   c                F
   V P                   pV P                  V! R 4      P                  R 4      4       V P                  V! R4      P                  R 4      4       V P                  V! R4      P                  R 4      4       V P                  V! R4      P                  R 4      4       V P                  V! R4      P                  R 4      4       V P                  V! R4      P                  R 4      4       V P                  V! R4      P                  R 4      4       V P                  V! R 4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R	4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R
4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R 4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  RRR7      4       V P                  V! R4      P                  RRR7      4       V P                  V! R4      P                  RRR7      4       V P                  V! R4      P                  RRR7      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R 4      4       V P                  V! R4      P                  R!4      4       R"# )#b.pyza/b.pyz/a/b.pyza.pyzb/pyz/a.pyzb.py/cz*.pyzb.pyczb./pyzab/c.pyza*/*.pyz
/d/ab/c.pyz	/dab/c.pyz	ab/c.py/d/b.py/*.pyz/a/*.pyz/ab.pyry  z/**/*.pyz
/a/**/*.pyrs  rt  Tru  Frw  rx  rz  rs   *****/*Nr   r}  r   r{  r   s   & r   test_match_commonPurePathTest.test_match_common0  s   HH&	/0())&12)**6236016017))&128**623&	/0())&12)**6237))&127))&128**623)**956,--i89634;--i89;--i89'
((126128**7349++G45)**9568**956;--i89;--j9:+,,\:;6EF&	uEF;--k$-OP+,,[,OP2S)*2T*+2V,-r   c                j    V P                   pV P                  V! R 4      P                  R4      4       R# )rs  rt  N)r   r{  r   r   s   & r   test_match_posixPurePathTest.test_match_posix]  s&    HH601r   c                   V P                   pV P                  V! R 4      P                  R4      4       V P                  V! R 4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R	4      P                  R
4      4       V P                  V! R	4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R4      P                  R4      4       V P                  V! R 4      P                  R4      4       V P                  V! R 4      P                  R4      4       V P                  V! R	4      P                  R4      4       R# )zc:/b.pyz*:/*.pyzc:/*.pyzd:/b.pyr  r  zc:*.pyzc:b.pyr  z//some/share/a.pyz
//*/*/*.pyz//some/share/*.pyz//other/share/a.pyz//some/share/a/b.pyzB.pyzb.PYrw  rx  z//Some/Share/B.Pyz//somE/sharE/*.pYNr  r   s   & r   test_match_windowsPurePathTest.test_match_windowsb  sI   HH)**956)**9569++I676126236348**7348**9567))(347)))45-.44\BC-.445HIJ/0667JKL01778KLM&	/0+,,[9:-.445HIJ9++G459++H56./55g>?r   c                    V P                   pV! R RRRR.4       V! RRRRR.4       V! RRRRR.4       V! RRRR.4       V! R	RRR	.4       V! R
RRR
.4       R# )r   rs   rN  rQ   r   z///a/br   z////a/bry   r{   z\aNr   r   r   s   & r   test_parse_path_posix"PurePathTest.test_parse_path_posix~  su    && 	gTC:.hS3*-iS3*-eR%*gR',eR%*r   c                    V P                   pV P                  V! R 4      V! R4      4       V P                  V! R4      V! R4      4       V P                  V! R4      V! R4      4       R# )rM   A/br)  z///a//aN)r   r   ri   r   s   & r   test_eq_posixPurePathTest.test_eq_posix  sS    HHAeHah/4!F),AdGQuX.r   c                   V P                   pV P                  V P                  V! R 4      4      R4       V P                  V P                  V! R4      4      R4       V P                  V P                  V! R4      4      R4       R# )r   zfile:///z/a/b.czfile:///a/b.cz/a/b%#czfile:///a/b%25%23cN)r   ri   r2  r   s   & r   test_as_uri_posixPurePathTest.test_as_uri_posix  sc    HHqv.
;q{3_Eq|46JKr   c           	     ,   ^ RI Hp V P                  p \        P                  ! R4       V P                  V P                  V! R4      4      RV! \        P                  ! R4      4      ,           4       R#   \
         d    T P                  R4        Lhi ; i)r   quote_from_bytes   éz1\xe9 cannot be encoded to the filesystem encodingu   /a/bézfile:///a/bN)	urllib.parser  r   r   r  UnicodeEncodeErrorrW   ri   r2  )r   r  rn   s   &  r   test_as_uri_non_ascii"PurePathTest.test_as_uri_non_ascii  sw    1HH	PKK 	q}5&)9"++f:M)NN	P " 	PMMNO	Ps   A4 4BBc                    V P                   pV! R RR4      pV! \        P                  ! R4      4      pV P                  W#4       R# )rx   rQ   r   c:\a\bN)r   r6   r   ri   )r   rn   r[   r   s   &   r   test_parse_windows_path$PurePathTest.test_parse_windows_path  s<    HHdCw&&z23r   r   ry   c:/arF  r   c                <    V P                  V P                  4       R # r   )r   windows_equivalencesr:   s   &r   test_equivalences_windows&PurePathTest.test_equivalences_windows  s    t889r   c                n   V P                   pV! R R R. 4       V! RR R. 4       V! RRR. 4       V! RR RR.4       V! RR RR.4       V! RRRR.4       V! R	R
R. 4       V! RRR. 4       V! RRR. 4       V! RRR. 4       V! RRR. 4       V! RRRR.4       V! RRR. RCO4       V! RRRR.4       V! RRR. 4       V! RRR. 4       V! RRRR.4       V! RRR. 4       V! R R!R. 4       V! R"R#R. 4       V! R$R%R. 4       V! R&R'R. 4       V! R(R)R. 4       V! R*R+R. 4       V! R,R+R. 4       V! R-R+RR.4       V! R.R/R. 4       V! R0R1R. 4       V! R2R3R. 4       V! R4R5R. 4       V! R6R7R. 4       V! R8RRR9.4       V! R:RRR:.4       V! R;R<RR9.4       V! R=R<RR9.4       V! R>R?RRR@.4       V! RAR?RRR@.4       RB# )Drx   rs   rC  rS  r   ry   rQ   r  r)  rN  z\\r  z\\az//a/z\\a\r   rE  rF  r   r   zZ://b//c/d/zZ:r   z//b/c//dz\\b\cz//./c:z\\.\c:z//?/c:/z\\?\c:z//?/c:/az//?z\\?z//?/z\\?\z//?/UNCz\\?\UNC//?/UNC/z\\?\UNC\z	//?/UNC/bz	\\?\UNC\bz
//?/UNC/b/z
\\?\UNC\b\z//?/UNC/b/cz\\?\UNC\b\cz//?/UNC/b/c/z//?/UNC/b/c/dz//./BootPartition/z\\.\BootPartitionz//?/BootPartition/z\\?\BootPartitionz//./PhysicalDrive0z\\.\PhysicalDrive0z//?/Volume{}/z\\?\Volume{}z//./nulz\\.\nulz./c:szc:szcc:szC:c:szC:zC:/c:szD:a/c:bzD:zc:bzD:/a/c:bN)r   r   r   r  r  s   & r   test_parse_path_windows$PurePathTest.test_parse_path_windows  s<   &&dT2r2eT44cRr2eT2u5fT4#7dRu5dVR4eWb"5fYB7gZr:hZr:iZu=mT4AjZu=h["b9i[$;j[$>eWb"5fYB7i\2r:j^R<k_b"=l%6B?m%7rBn%7rBo%7uE"%;T2F"%;T2F"%<b"Eo%6bAi\2r:gReW5fRfX6gT2w7hT4%9iT2U|<jT4#u>r   c                >   V P                   pV P                  V! R 4      V! R 4      4       V P                  V! R 4      V! RRR4      4       V P                  V! R 4      V! R4      4       V P                  V! R 4      V! R4      4       V P                  V! R4      V! R4      4       V P                  V! R4      V! R4      4       V P                  V! R	4      V! R
4      4       V P                  V! R4      V! R4      4       V P                  V! R4      V! R4      4       R# )rB  rx   rQ   r   zd:a/bc:/a/br   za/Br  C:a/Bc:A/b//Some/SHARE/a/Bz//somE/share/A/bu   İu   i̇N)r   ri   r   r   s   & r   test_eq_windowsPurePathTest.test_eq_windows  s    HH7QwZ07QtS#%67AgJ'
3AgJ(4AfIq{351U8,7QwZ0-.2D0EF8a	l3r   c                   V P                   pV P                  \        4      ;_uu_ 4        V P                  V! R 4      4       RRR4       V P                  \        4      ;_uu_ 4        V P                  V! R4      4       RRR4       T P	                  V P                  V! R4      4      R4       V P	                  V P                  V! R4      4      R4       V P	                  V P                  V! R4      4      R4       V P	                  V P                  V! R	4      4      R
4       V P	                  V P                  V! R4      4      R4       ^ RIHp V! \        P                  ! \        4      4      pV P	                  V P                  V! R\        ,           4      4      RV,           4       V P	                  V P                  V! R\        ,           4      4      RV,           4       R#   + '       g   i     EL; i  + '       g   i     EL; i)r   NrB  rC  zfile:///c:/zc:/a/b.czfile:///c:/a/b.cz	c:/a/b%#czfile:///c:/a/b%25%23cz//some/share/zfile://some/share/z//some/share/a/b.czfile://some/share/a/b.cr  r  zfile:///c:/a/bz//some/share/a/b%#czfile://some/share/a/b%25%23c)
r   r   r5  r2  ri   r  r  r   r  r   )r   rn   r  QUOTED_FS_NONASCIIs   &   r   test_as_uri_windows PurePathTest.test_as_uri_windows  s{   HHz**MM!F)$ +z**MM!G*% +qx0-@q}57IJq~68OPq'9:<PQq)='>?2	4 	2-bkk+.FGqK)?'@A),>>	@q)>)L'MN7:LL	N +*****s   G$'G8$G5	8H		c                $  a  V 3R  lpS P                   pV! R4      pV! R4      pV! W44       S P                  W48  4       S P                  W48  4       V! R4      pV! R4      pV! W44       S P                  W48  4       S P                  W48  4       R# )c                 L   < SP                  W4       SP                  W4       R # r   )assertLessEqualassertGreaterEqualr&  s   &&r   assertOrderedEqual>PurePathTest.test_ordering_windows.<locals>.assertOrderedEqual  s      &##A)r   r  r  z//some/Share/A/br  N)r   r{  )r   r  rn   r[   r   s   f    r   test_ordering_windows"PurePathTest.test_ordering_windows  s    	* HHgJgJ1  ! !1 r   c                n   V P                   pV P                  V! R 4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       R# )	rs   rQ   r   r   r)  /a/b/r  r   Nr   r{  is_absoluter}  r   s   & r   test_is_absolute_posix#PurePathTest.test_is_absolute_posix"  s    HH2**,-3++-.6..01#**,-$++-.'
..01%,,./'
..01r   c                   V P                   pV P                  V! 4       P                  4       4       V P                  V! R 4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R	4      P                  4       4       V P                  V! R
4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       V P                  V! R4      P                  4       4       R# )rQ   r   r   r)  r  rx   ry   zc:a/b/rC  r  rD  rN  r  r   rF  r   r   r  z//?/UNC/spamNr  r   s   & r   test_is_absolute_windows%PurePathTest.test_is_absolute_windows.  s   HH*+3++-.6..013++-.4,,./7//124,,./5--/080023%,,./&	--/0)0023$++-.%,,./'
..01(//12)0023+2245*1134.)5578r   c                8   V P                   pV! R 4      pV P                  \        VP                  4       V P                  \        VP                  R4       V P	                  VP                  V! R4      4      V! R 4      4       V P	                  VP                  R4      V! R 4      4       V P	                  VP                  V! R4      4      V! R4      4       V P	                  VP                  R4      V! R4      4       V P	                  VP                  R4      V! R4      4       V P	                  VP                  V! R 4      4      V! R4      4       V P	                  VP                  R 4      V! R4      4       V P	                  VP                  V! R4      RR7      V! R 4      4       V P	                  VP                  RRR7      V! R 4      4       V P	                  VP                  V! R4      RR7      V! R4      4       V P	                  VP                  RRR7      V! R4      4       V P	                  VP                  RRR7      V! R4      4       V P	                  VP                  V! R 4      RR7      V! R4      4       V P	                  VP                  R RR7      V! R4      4       V P	                  VP                  V! R4      RR7      V! R	4      4       V P	                  VP                  RRR7      V! R	4      4       V P	                  VP                  V! R
4      RR7      V! R4      4       V P	                  VP                  R
RR7      V! R4      4       V P	                  VP                  V! R4      RR7      V! R4      4       V P	                  VP                  RRR7      V! R4      4       V P                  \
        VP                  V! R4      4       V P                  \
        VP                  V! R
4      4       V P                  \
        VP                  V! R4      4       V P                  \
        VP                  V! R4      4       V P                  \
        VP                  V! R4      4       V P                  \
        VP                  V! R4      4       V P                  \
        VP                  V! R4      4       V P                  \
        VP                  V! R4      RR7       V P                  \
        VP                  V! R4      RR7       V P                  \
        VP                  V! R4      RR7       V P                  \
        VP                  V! R4      RR7       V P                  \
        VP                  V! R4      RR7       V! R4      pV P	                  VP                  V! R4      4      V! R 4      4       V P	                  VP                  R4      V! R 4      4       V P	                  VP                  V! R4      4      V! R4      4       V P	                  VP                  R4      V! R4      4       V P	                  VP                  R4      V! R4      4       V P	                  VP                  V! R4      4      V! R4      4       V P	                  VP                  R4      V! R4      4       V P	                  VP                  V! R4      RR7      V! R 4      4       V P	                  VP                  RRR7      V! R 4      4       V P	                  VP                  V! R4      RR7      V! R4      4       V P	                  VP                  RRR7      V! R4      4       V P	                  VP                  RRR7      V! R4      4       V P	                  VP                  V! R4      RR7      V! R4      4       V P	                  VP                  RRR7      V! R4      4       V P	                  VP                  V! R4      RR7      V! R	4      4       V P	                  VP                  RRR7      V! R	4      4       V P	                  VP                  V! R4      RR7      V! R4      4       V P	                  VP                  RRR7      V! R4      4       V P	                  VP                  V! R4      RR7      V! R4      4       V P	                  VP                  RRR7      V! R4      4       V P                  \
        VP                  V! R4      4       V P                  \
        VP                  V! R4      4       V P                  \
        VP                  V! R4      4       V P                  \
        VP                  V! R4      4       V P                  \
        VP                  R4       V P                  \
        VP                  V! R4      4       V P                  \
        VP                  V! R4      4       V P                  \
        VP                  V! R4      4       V P                  \
        VP                  V! R4      4       V P                  \
        VP                  V! R4      RR7       V P                  \
        VP                  V! R4      RR7       V P                  \
        VP                  V! R4      RR7       V P                  \
        VP                  V! R4      RR7       V P                  \
        VP                  V! R4      RR7       R# )rM   r   rs   rQ   r   r   Twalk_upa/cz../br   ..r   z../a/br)  z../aza/..z/a/..r   r   /a//a/cr   /cN)r   r   r   r   ri   r5  r   s   &  r   test_relative_to_common$PurePathTest.test_relative_to_commonH  sQ   HHeH)Q]]3)Q]]D9qu-qx8r*AeH5qv.#7s+QsV4t,af5qx0!B%8u-qu5qud;QuXFr48!E(Cqvt<afEsD91S6BtT:AcFCqx>"Fud;QrUCqx>&	Jud;QvYGqz4@!D'Jw=qwGqvt<akJsD91X;G*ammQsV<*ammQwZ@*ammQuX>*ammQtW=*ammQvY?*ammQvY?*ammQwZ@*ammQsVTJ*ammQtWdK*ammQvYM*ammQvYM*ammQwZNfIqv.%9s+QuX6qw/38t,af5u-qv6qy11R59v."6qvt<ahGsD91U8Dqw=qvFtT:AcFCud;QsVDqy$?2Gvt<aeDqy$?6Kvt<aiHq{DA1T7Kx>$Hqw=q{KtT:AhKH*ammQtW=*ammQx[A*ammQvY?*ammQrU;*ammR8*ammQsV<*ammQvY?*ammQvY?*ammQwZ@*ammQrUDI*ammQsVTJ*ammQvYM*ammQvYM*ammQwZNr   c                   V P                   pV! R 4      pV P                  VP                  V! R4      4      V! R4      4       V P                  VP                  R4      V! R4      4       V P                  VP                  V! R4      4      V! R4      4       V P                  VP                  R4      V! R4      4       V P                  VP                  R4      V! R4      4       V P                  VP                  V! R4      4      V! 4       4       V P                  VP                  R4      V! 4       4       V P                  VP                  V! R4      RR7      V! R4      4       V P                  VP                  RRR7      V! R4      4       V P                  VP                  V! R4      RR7      V! R4      4       V P                  VP                  RRR7      V! R4      4       V P                  VP                  RRR7      V! R4      4       V P                  VP                  V! R4      RR7      V! 4       4       V P                  VP                  RRR7      V! 4       4       V P                  VP                  V! R	4      RR7      V! R
4      4       V P                  VP                  V! R4      RR7      V! R4      4       V P                  VP                  V! R4      RR7      V! R4      4       V P                  \        VP                  V! 4       4       V P                  \        VP                  R4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! R	4      4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! 4       RR7       V P                  \        VP                  RRR7       V P                  \        VP                  V! R4      RR7       V P                  \        VP                  V! R4      RR7       V P                  \        VP                  V! R4      RR7       V P                  \        VP                  V! R4      RR7       V P                  \        VP                  V! R4      RR7       V! R4      pV P                  VP                  V! R4      4      V! R4      4       V P                  VP                  R4      V! R4      4       V P                  VP                  V! R4      4      V! R4      4       V P                  VP                  R4      V! R4      4       V P                  VP                  R4      V! R4      4       V P                  VP                  V! R4      4      V! 4       4       V P                  VP                  R4      V! 4       4       V P                  VP                  V! R4      RR7      V! R4      4       V P                  VP                  RRR7      V! R4      4       V P                  VP                  V! R4      RR7      V! R4      4       V P                  VP                  RRR7      V! R4      4       V P                  VP                  RRR7      V! R4      4       V P                  VP                  V! R4      RR7      V! 4       4       V P                  VP                  RRR7      V! 4       4       V P                  VP                  RRR7      V! R4      4       V P                  VP                  RRR7      V! R
4      4       V P                  VP                  RRR7      V! R4      4       V P                  \        VP                  R4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! R4      4       V P                  \        VP                  V! R 4      4       V P                  \        VP                  RRR7       V P                  \        VP                  V! R4      RR7       V P                  \        VP                  V! R4      RR7       V P                  \        VP                  V! R4      RR7       V P                  \        VP                  V! R4      RR7       V P                  \        VP                  V! R4      RR7       V P                  \        VP                  V! R4      RR7       V P                  \        VP                  V! R 4      RR7       V! R!4      pV P                  VP                  V! R"4      4      V! R4      4       V P                  VP                  R"4      V! R4      4       V P                  VP                  R#4      V! R4      4       V P                  VP                  V! R$4      4      V! R4      4       V P                  VP                  R$4      V! R4      4       V P                  VP                  R%4      V! R4      4       V P                  VP                  V! R&4      4      V! 4       4       V P                  VP                  R&4      V! 4       4       V P                  VP                  V! R"4      RR7      V! R4      4       V P                  VP                  R"RR7      V! R4      4       V P                  VP                  R#RR7      V! R4      4       V P                  VP                  V! R$4      RR7      V! R4      4       V P                  VP                  R$RR7      V! R4      4       V P                  VP                  R%RR7      V! R4      4       V P                  VP                  V! R&4      RR7      V! 4       4       V P                  VP                  R&RR7      V! 4       4       V P                  VP                  V! R'4      RR7      V! R4      4       V P                  VP                  R'RR7      V! R4      4       V P                  \        VP                  V! R(4      4       V P                  \        VP                  V! R)4      4       V P                  \        VP                  V! R*4      4       V P                  \        VP                  V! R+4      4       V P                  \        VP                  V! R(4      RR7       V P                  \        VP                  V! R)4      RR7       V P                  \        VP                  V! R*4      RR7       V P                  \        VP                  V! R+4      RR7       R,# )-	C:Foo/Barrx   zFoo/Barc:foOBarc:foO/	c:foO/baRTr  C:Foo/Bar/Bazr  	C:Foo/Bazz../Barz	C:Baz/Barz../../Foo/Barrs   r_  r   Foo/FooC:/Foo
C:/Foo/BarrC  c:/foOc:/foO/
c:/foO/baRC:/Bazz
../Foo/BarC:/Foo/Bar/Baz
C:/Foo/BazC:Food:///C/Foo//Server/Share/Foo/Bar//sErver/sHare//sErver/sHare///sErver/sHare/Foo//sErver/sHare/Foo///sErver/sHare/Foo/Barz//sErver/sHare/bar/Server/Share/Fooc:/Server/Share/Foo//z/Share/Foo//Server/z/FooN)r   ri   r   r   r5  r   s   &  r   test_relative_to_windows%PurePathTest.test_relative_to_windows  s   HHkNqw/9>t,a	l;qz2AeH=w/5:x0!E(;q~6<{3QS9qw=q|LtT:AiLIqz4@!E(Kw=qxHx>%Iq~tDacJ{DA13Gq'94H!D'Rq~tDakRq~tDaFXY*ammQS9*ammR8*ammQtW=*ammQsV<*ammQuX>*ammQvY?*ammQx[A*ammQ5GH*ammQ{^D*ammQS$G*ammRF*ammQtWdK*ammQsVTJ*ammQuXtL*ammQvYM*ammQx[$OlOqx0!I,?u-q|<q{3QuX>x0!E(;y11U8<q7=|4ac:qx>)Mud;Qy\Jq{DA1U8Lx>%Iy$?5JqEqsK|TBACHx>,P'7F$P|TBAhKP*ammT:*ammQtW=*ammQx[A*ammQ7G5HI*ammQ|_E*ammQwZ@*ammQtW=*ammQuX>*ammQsV<*ammQvY?*ammQy\B*ammT4H*ammQtWdK*ammQwZN*ammQtWdK*ammQuXtL*ammQsVTJ*ammQvYM*ammQy\4P&'q)9':;Qy\J'78!I,G'891Y<Hq)='>?5J';<ahG'<=qxHq)A'BCQSI'?@!#Fq)9':DI1Y<X'7F)U'8$G9Vq)='>MqQVxX';TJAeHU'<dKQuXVq)A'BDQSTSVW'?NPQPSTq)='>MqQ]_';TJAlO\*ammQ7J5KL*ammQ7L5MN*ammQ5GH*ammQ7G5HI*ammQ7J5KUYZ*ammQ7L5MW[\*ammQ5GQUV*ammQ7G5HRVWr   c                4   V P                   pV! R 4      pV P                  \        VP                  4       V P                  \        VP                  R4       V P	                  VP                  V! R4      4      4       V P	                  VP                  R4      4       V P	                  VP                  V! R4      4      4       V P	                  VP                  R4      4       V P	                  VP                  V! R 4      4      4       V P	                  VP                  R 4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V! R	4      pV P	                  VP                  V! R
4      4      4       V P	                  VP                  R
4      4       V P	                  VP                  V! R4      4      4       V P	                  VP                  R4      4       V P	                  VP                  R4      4       V P	                  VP                  V! R	4      4      4       V P	                  VP                  R	4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  R4      4       V P                  VP                  V! R4      4      4       R# )rM   r   rs   rQ   r   r   r   r  r)  r   r   r  r  r   r  N)r   r   r   is_relative_tor}  r{  r   s   &  r   test_is_relative_to_common'PurePathTest.test_is_relative_to_common  s   HHeH)Q%5%56)Q%5%5t<((2/0((,-((301((./((523((/0))!C&12))!G*56))!E(34))!D'23fI((301((-.((412((./((/0((634((01))!D'23))!H+67))!F)45))!B%01))"-.))!C&12r   c                t   V P                   pV! R 4      pV P                  VP                  V! R4      4      4       V P                  VP                  R4      4       V P                  VP                  V! R4      4      4       V P                  VP                  R4      4       V P                  VP                  R4      4       V P                  VP                  V! R4      4      4       V P                  VP                  R4      4       V P                  VP                  V! 4       4      4       V P                  VP                  R4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R	4      4      4       V P                  VP                  V! R
4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V! R4      pV P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  R4      4       V P                  VP                  V! R4      4      4       V P                  VP                  R4      4       V P                  VP                  R4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R	4      4      4       V P                  VP                  V! R4      4      4       V! R4      pV P                  VP                  V! R4      4      4       V P                  VP                  R4      4       V P                  VP                  R4      4       V P                  VP                  V! R4      4      4       V P                  VP                  R4      4       V P                  VP                  R4      4       V P                  VP                  V! R4      4      4       V P                  VP                  R4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R4      4      4       V P                  VP                  V! R 4      4      4       V P                  VP                  V! R!4      4      4       R"# )#r  rx   r  r  r  rs   r_  r   r  r  r  r  r  r  rC  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  N)r   r}  r  r{  r   s   &  r   test_is_relative_to_windows(PurePathTest.test_is_relative_to_windows  s   HHkN((412((./((745((12((23((;89((56))!#./))"-.))!D'23))!C&12))!E(34))!F)45))!H+67))!O*<=>))!K.9:lO((523((856((34((<9:((67))$/0))!H+67))!,<*=>?))!L/:;))!G*56))!D'23))!E(34))!C&12))!F)45))!I,78&'((+;)<=>(()9:;(():;<((+?)@AB(()=>?(()>?@((+C)DEF(()ABC))!,?*@AB))!,A*BCD))!O*<=>))!,<*=>?r   )rY   rU   rX   )
)rQ   r   )r   r   )rQ   r   )r   r   )r   )za//b)za//b//)rs   rQ   r   )rQ   rs   r   )rQ   r   rs   ))rQ   /b/cr   )r)  r  r   )r   r   rs   zc/d)r   rs   zb/c/d)rs   rN   r   )r   ))rx   rQ   )rx   r   )rP   rx   rQ   ))rC  rQ   )rx   r   rQ   )rx   r)  )z/zrC  rQ   )z//x/yrC  rQ   )r   )r   r   )rF  r   )Rr(   r=   r>   r?   r6   r   r   r   r   realpathr   baser  r\   rp   ru   r.   r|   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r	  r  r  r   r*  r2  r6  r:  r?  rG  rK  r+   rP  rT  rW  r[  rc  rf  ri  rl  rp  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r@   rA   rB   s   @r   rL   rL   ^   s9    


C 77F#D
 	  	 L	)
+- 
> 
>B1 
3 
3)*"4 ; ;//"$(
(
6
<0%2	=
=&6(8!	-* 	/ 	/. 0 0 4 40*
 	F 	F? 	D 	D?V9
+.Z 2 2 @ @6 
+ 
+ / / L L P P     	:>  	J.O : : .? .?` 4 4 N N(    " 	2 	2 9 92IOV gX gXR3@ 3@ 3@r   rL   c                   .    ] tR tRt]P
                  tRtR# )PurePosixPathTestiT  r#   N)r(   r=   r>   r?   r6   r   r   r@   r#   r   r   r  r  T  s    


Cr   r  c                   .    ] tR tRt]P
                  tRtR# )PureWindowsPathTestiX  r#   N)r(   r=   r>   r?   r6   r   r   r@   r#   r   r   r	  r	  X  s    

!
!Cr   r	  c                   D    ] tR tRt ! R R]P
                  4      tRtRtR# )PurePathSubclassTesti\  c                       ] tR tRtRtR# )PurePathSubclassTest.clsi]  r#   Nra   r#   r   r   r   r  ]      r   r   Nr#   )	r(   r=   r>   r?   r6   r   r   r:  r@   r#   r   r   r  r  \  s    g   r   r  c                   h  a a ] tR tRt o]P
                  t]P                  ! 4       tV 3R lt	R t
R tR tR tR tR tR	 tR
 tR tR tR t]P,                  ! ]RJ RR7      R 4       t]P,                  ! ]R4      R 4       tR tR tR tR t]R 4       t ]R 4       t!]PD                  R 4       t#]R 4       t$]R 4       t%]R 4       t&]R 4       t']R 4       t(]R  4       t)]R! 4       t*]R" 4       t+]R# 4       t,]R$ 4       t-]R% 4       t.]R& 4       t/R' t0]P,                  ! ]1Pd                  R(8H  ;'       g    ]1Pd                  R)8H  R*4      ]P,                  ! ]3R+4      R, 4       4       t4R- t5]PD                  R. 4       t6]R/ 4       t7]R0 4       t8]R1 4       t9]R2 4       t:]R3 4       t;R4 t<]=R5 4       t>R6 t?]=R7 4       t@R8 tA]=R9 4       tBR: tCR; tD]=R< 4       tER= tF]=R> 4       tGR? tHR@ tI]=RA 4       tJ]=]RB 4       4       tK]=]RC 4       4       tL]=]RD 4       4       tM]=]RE 4       4       tN]=]RF 4       4       tORG tP]=RH 4       tQRI tR]=RJ 4       tS]RK 4       tT]RL 4       tU]RM 4       tVRN tWRRO ltX]X;tYtZ]RP 4       t[]RQ 4       t\RR t]]^]RS 4       4       t_RT t`]RU 4       ta]P,                  ! ]b! ]cRV4      RW4      RX 4       td]P                  RY 4       tf]^]P                  RZ 4       4       tgR[ th]P                  ! ]R\4      R] 4       tj]P                  ! ]R\4      ]P                  ! ]3R^4      R_ 4       4       tkR` tl]P                  ! ]mRa4      Rb 4       tn]P                  ! ]mRa4      ]P                  ! ]3R^4      Rc 4       4       toRd tpRe tqRf trRg tsRh ttRi tu]Rj 4       tv]Rk 4       tw]P,                  ! ]1Pd                  Rl,          Rm8H  Rn4      ]P                  ]P                  Ro 4       4       4       ty]zRp 4       t{]zRq 4       t|]P                  ! ]b! ]cRr4      Rs4      ]P,                  ! ]1Pd                  Rt8H  Ru4      Rv 4       4       t}Rw t~]P                  Rx 4       t]P,                  ! ]b! ]cRy4      Rz4      R{ 4       tR| tR} tR~ tR tR tR tR tR tR t]zR 4       tR tR tR t]R 4       t]P,                  ! ]b! ]cR4      R4      R 4       tR tR tR t]R 4       tR tR t]R 4       t]R 4       tR tR tR tR tR tR tR tR tR tR t]P                  ! ]b! ]cRr4      R4      ]P,                  ! ]1Pd                  Rt8H  Ru4      R 4       4       tR t]P                  ! ]b! ]R4      R4      ]P,                  ! ]R4      ]P,                  ! ]R4      R 4       4       4       tR tR tR tR tR tR t]R 4       t]^R 4       t]zR 4       tR tR tR tR tR t]R 4       t]P,                  ! ]R4      R 4       tR tR t]R 4       t]R 4       tR t]^R 4       t]zR 4       t]R 4       t]R 4       t]R 4       t]^R 4       t]P,                  ! ]R4      ]^R 4       4       t]^R 4       t]P,                  ! ]R4      ]^R 4       4       t]P                  ! ]b! ]R4      R4      ]P,                  ! ]1Pd                  Rt8H  R4      ]^R 4       4       4       t]P,                  ! ]1Pd                  R8g  R4      ]^R 4       4       t]^R 4       t]^R 4       t]zR 4       t]zR 4       t]zR 4       t]zR 4       t]zR 4       t]zR 4       tRtVtV ;t# )PathTestih  c                  < V P                  4       P                  R 4      R,          pV\        9   d$   V P                  '       g   V P	                  R4       \
        SV `  4        \        P                  ! V P                  4       \        P                  ! \        P                  P                  V P                  R4      4       \        P                  ! \        P                  P                  V P                  R4      4       \        P                  ! \        P                  P                  V P                  R4      4       \        P                  ! \        P                  P                  V P                  RR4      4       \        P                  ! \        P                  P                  V P                  R4      4       \        \        P                  P                  V P                  R4      R4      ;_uu_ 4       pVP                  R	4       R
R
R
4       \        \        P                  P                  V P                  RR4      R4      ;_uu_ 4       pVP                  R4       R
R
R
4       \        \        P                  P                  V P                  RR4      R4      ;_uu_ 4       pVP                  R4       R
R
R
4       \        \        P                  P                  V P                  RR4      R4      ;_uu_ 4       pVP                  R4       R
R
R
4       \        \        P                  P                  V P                  RRR4      R4      ;_uu_ 4       pVP                  R4       R
R
R
4       \        P                  ! \        P                  P                  V P                  R4      ^ 4       V P                  '       Ed   \        P                  ! R\        P                  P                  V P                  R4      4       \        P                  ! R\        P                  P                  V P                  R4      4       \        P                  ! R\        P                  P                  V P                  R4      RR7       \        P                  ! \        P                  P                  RR4      \        P                  P                  V P                  RR4      RR7       \        P                  ! \        P                  P                  RR4      \        P                  P                  V P                  RR4      RR7       \        P                  ! R\        P                  P                  V P                  R4      4       R
# R
#   + '       g   i     EL; i  + '       g   i     EL?; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELu; i)rP   requires symlinksdirAdirBdirCdirDdirEfileAwbs   this is file A
NfileBs   this is file B
fileCs   this is file C
	novel.txts   this is a novel
fileDs   this is file D
linkAnon-existing
brokenLinklinkBTtarget_is_directoryr  linkClinkDbrokenLinkLooprR   )rS   rT   r0   can_symlinkrW   superr\   r   mkdirr  r   joinopenwritechmodsymlink)r   rZ   fr   s   &  r   r\   PathTest.setUpm  sm   wwys#B'**43C3C3CMM-.

dii01
dii01
dii01
dii89
dii01"'',,tyy'2D99QGG'( :"'',,tyy&':DAAQGG'( B"'',,tyy&':DAAQGG'( B"'',,tyy&+>EEGG() F"'',,tyy&&'BDIIQGG'( J
dii0!4JJwTYY @AJJ~rww||DII|'LMJJvww||DIIw7+/1 JJrww||D&1ww||DIIvw?+/1 JJrww||D&1ww||DIIvw?+/1 JJ'diiAQ)RS  :99AAAAAAEEEIIIs<   7VV%V*<V>WV	V'	*V;	>W	W#	c                    \         P                  ! \         P                  P                  V P                  R 4      R4       \
        P                  ! V P                  4       R# )r    N)r   r-  r   r*  r  r   rmtreer:   s   &r   tearDownPathTest.tearDown  s5    
dii0%8#r   c                    V P                  \        4      ;_uu_ 4       pV! V/ VB  R R R 4       V P                  XP                  P                  \        P
                  4       R #   + '       g   i     LF; ir   )r   FileNotFoundErrorri   	exceptionr   ENOENT)r   funcrm   kwargscms   &&*, r   assertFileNotFoundPathTest.assertFileNotFound  sO    011R$!&! 2++U\\: 21s   	A%%A5	c                n    V P                   P                  pV P                  V! V4      V! V4      4       R # r   )rU   normcaseri   )r   path_apath_br@  s   &&& r   assertEqualNormCasePathTest.assertEqualNormCase  s+    ;;''&)8F+;<r   c                    \         P                  ! \        P                  ! R \        P
                  ! 4       R7      4      pV P                  \         P                  V4       V# )z-dirD)suffixdir)r   	_longpathtempfilemkdtempr   getcwd
addCleanupr3  )r   r   s   & r   tempdirPathTest.tempdir  sE     0 057YY[!B C	((!,r   c                v   \        \        P                  P                  4       Uu0 uF  q^ ,          R8w  g   K  VkK  	  ppV Fl  pVR8X  d   K  \	        V P
                  V4      p\	        \        P                  P                  V4      pV P                  VP                  VP                  4       Kn  	  R# u upi )r   _rU   N)rG  r6   types_WritablePathgetattrr   ri   __doc__)r   rZ   
path_names	attr_nameour_attr	path_attrs   &     r   $test_matches_writablepath_docstrings-PathTest.test_matches_writablepath_docstrings  s    '*7==+F+F'GZ'GtPQ7VY>dd'G
Z#IH$ txx3H ; ;YGIX--y/@/@A $ [s
   B6B6c                   V P                   \        P                  J d7   \        P                  R 8X  d   \        P
                  M\        P                  pMV P                   pV P                  R4      pV P                  \        V4      V4       R# r   )	r   r6   r.  r   rZ   WindowsPath	PosixPathrk   rl   r   s   &  r   r   PathTest.test_concrete_class  sW    88w||#.0ggow**7CTCTHxxHHHSMd1gx(r   c                    V P                   P                  \        P                  J d   V P	                  R 4       R# V P                  \        P                  V P                   4       R# )zpath parser is supportedN)r   rU   r   r   rW   r   r6   r7   r:   s   &r   test_unsupported_parser PathTest.test_unsupported_parser  s=    88??bgg%MM45g::DHHEr   c                >   V P                  \        P                  ! 4       4      pV P                  W4       V P	                  \        V4      \        V4      4       V P                  \        V4      \        V4      4       V P                  VP                  4       4       R # r   )
r   r   rK  ri   rC  rh   rk   rl   r}  r  r   s   && r   	_test_cwdPathTest._test_cwd  sd    HHRYY[!  QQ0d1gtAw'(r   c                \    V P                   P                  4       pV P                  V4       R # r   )r   cwdrc  r   s   & r   test_cwdPathTest.test_cwd  s    HHLLNqr   c                   V P                   p\        P                  ! R 4      ;_uu_ 4       pV P                  Vn        V P                  \        V! 4       P                  4       4      V P                  4       V P                  \        V! R4      P                  4       4      V P                  4       V P                  \        V! R4      P                  4       4      \        P                  P                  V P                  R4      4       V P                  \        V! RRR4      P                  4       4      \        P                  P                  V P                  RRR4      4       V P                  \        V! RR4      P                  4       4      \        P                  P                  V P                  RR4      4       V P                  \        V! R4      P                  4       4      \        P                  P                  V P                  R4      4       V P                  \        V! R4      P                  4       4      \        P                  P                  V P                  R4      4       V P                  \        V! R	4      P                  4       4      \        P                  P                  V P                  R	4      4       V P                  \        V! RR	4      P                  4       4      \        P                  P                  V P                  RR	4      4       V P                  \        V! R	R4      P                  4       4      \        P                  P                  V P                  R	R4      4       R
R
R
4       R
#   + '       g   i     R
# ; i)	os.getcwdrP   rQ   r   r   r!  r  r   r&  r  N)r   r   patchr  return_valueri   rh   absoluter   r   r*  )r   rn   rK  s   &  r   test_absolute_commonPathTest.test_absolute_common  sK   HHZZ$$"&))F S0$))<S3!23TYY?S3!23RWW\\$))S5QRS3S!1!:!:!<=rww||DIIWZ\_ad?ef S7G!4!=!=!?@"'',,tyyZacjBklS<!9!9!;<bggll499Vb>cdS#3!4!=!=!?@"'',,tyyZjBkl S4!1!1!34bggll499d6STS3!6!6!89277<<		SVX\;]^S4!6!6!89277<<		SWY\;]^# %$$$s   MM::N	c                R   V P                  \        P                  P                  R 4      4      pV P	                  W4       V P                  \        V4      \        V4      4       V P                  \        V4      \        V4      4       V P                  VP                  4       4       R# )~N)r   r   r   
expanduserri   rC  rh   rk   rl   r}  r  r   s   && r   
_test_homePathTest._test_home  sm    HHRWW'',-  QQ0d1gtAw'(r   Nz(Test requires pwd module to get homedir.)reasonc                D   \         P                  ! 4       ;_uu_ 4       pV P                  V P                  P	                  4       4       VP                  4        \        P                  P                  V P                  R 4      VR&   V P                  V P                  P	                  4       4       \        P                  P                  V P                  R4      VR&   V P                  V P                  P	                  4       4       RRR4       R#   + '       g   i     R# ; i)userprofileUSERPROFILEhomeHOMEN)
r   EnvironmentVarGuardrs  r   ry  clearr   r   r*  r  )r   envs   & r   	test_homePathTest.test_home  s     **,,OODHHMMO,IIK!#dii!GCOODHHMMO, '',,tyy&9CKOODHHMMO, -,,,s   C&DD	zWASI has no user accounts.c                   V P                   pV! R 4      pV P                  VP                  4       V! \        P                  P                  R 4      4      4       V! R4      pV P                  VP                  4       V4       V! R4      pV P                  VP                  4       V4       V! R4      pV P                  VP                  4       V4       V! V! R4      P                  4       P                  4      R ,          pV P                  VP                  4       V4       V! R4      pV P                  VP                  4       V! \        P                  P                  R 4      R4      4       R# )rq  foo/~../~rs   z~/a:br   N)r   ri   rr  r   r   rm  anchorr   s   &  r   test_expanduser_commonPathTest.test_expanduser_common  s   HHcF277+=+=c+B)CDeH+dG+fI+aenn%%&,+gJ277+=+=c+BG)LMr   c                    ! R  RV P                   4      pV! V P                  ^*R7      pV P                  ^*VP                  4       P                  4       V P                  ^*VP                  4       P                  4       \        '       g:   V P                  ^*VP                  R4      P                  4       P                  4       V P                  ^*VR,          P                  VR,          4      P                  4       V P                  ^*VR,          P                  VR,          4      P                  4       V P                  '       d2   V P                  ^*VR,          P                  4       P                  4       VP                  4        F  pV P                  ^*VP                  4       K!  	  VP                  R4       F  pV P                  ^*VP                  4       K!  	  VP                  R4       F  pV P                  ^*VP                  4       K!  	  VP!                  4        F"  w  rEpV P                  ^*VP                  4       K$  	  R# )	c                   8   a a ] tR tRt oV 3R ltR tRtVtV ;t# )&PathTest.test_with_segments.<locals>.Pi  c               0   < \         SV `  ! V!   Wn        R # r   )r(  __init__
session_id)r   r  pathsegmentsr   s   &$*r   r  /PathTest.test_with_segments.<locals>.P.__init__	  s     ,/",r   c                8    \        V 4      ! VR V P                  / # r  )rl   r  )r   r  s   &*r   with_segments4PathTest.test_with_segments.<locals>.P.with_segments  s    Dz<LDOOLLr   r  )	r(   r=   r>   r?   r  r  r@   rA   __classcell__r   rC   s   @@r   rn   r    s     -M Mr   rn   r  rq  r  r  r  r  N)r   r  ri   rm  r  resolver   r  rr  renamer   r'  readlinkiterdirglobrglobwalk)r   rn   r[   r   dirpathdirnames	filenamess   &      r   test_with_segmentsPathTest.test_with_segments  s   	M 	M diiB'QZZ\445QYY[334wR!5!@!@!B!M!MNa'k11!g+>IIJa'k221w;?JJKR!g+!7!7!9!D!DEIIKDR1  FF3KDR1  GGCLDR1 !,-FFH(GyR!3!34 -5r   c                J   V P                  V P                  4      pVR ,          P                  R4      ;_uu_ 4       pV P                  V\        P
                  4       V P                  VP                  4       R4       RRR4       VR ,          P                  R4      ;_uu_ 4       pV P                  V\        P                  4       V P                  VP                  4       P                  4       R4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)r  r   zthis is file A
Nrb   this is file A)
r   r  r+  r9   io
TextIOBaseri   readBufferedIOBasestripr   r[   r/  s   &  r   test_open_commonPathTest.test_open_common!  s    HHTYY'k$$!!!R]]3QVVX'9: % 'k%%!!!R%6%67QVVX^^-/@A &% %$ &%%s   AC>%AD>D	D"	c                V   V P                  V P                  4      pVR ,          P                  R^ R7      ;_uu_ 4       pV P                  V\        P
                  4       V P                  VP                  4       P                  4       R4       RRR4       R#   + '       g   i     R# ; i)r  r  )	bufferingr  N)	r   r  r+  r9   r  	RawIOBaseri   r  r  r  s   &  r   test_open_unbufferedPathTest.test_open_unbuffered*  sq    HHTYY'k22a!!!R\\2QVVX^^-/@A 3222s   ABB(	c                   V P                  V P                  4      pVR ,          p\        \        R4      '       d;   \        P                  ! V\
        P                  \
        P                  ,          4       \        \        R4      '       d<   \        \
        R4      '       d&   \        P                  ! V\
        P                  4       VP                  4       pVR,          pVP                  VRR7       V P                  VP                  4       4       V P                  VP                  4       VP                  4       4       VP                  4       pV P                  VP                   VP                   4       V P                  VP"                  VP"                  4       V P                  VP$                  VP$                  4       \        VR4      '       d)   V P                  VP&                  VP&                  4       R# R# )	r  r-  chflags	UF_NODUMPcopyATpreserve_metadatast_flagsN)r   r  hasattrr   r-  statS_IRWXUS_IRWXOr  r  copyr}  existsri   	read_textr  st_atimest_mtimest_moder  r   r  source	source_str   	target_sts   &     r    test_copy_file_preserve_metadata)PathTest.test_copy_file_preserve_metadata0  sU   xx		"2wHHVT\\DLL892y!!gdK&@&@JJvt~~.KKM	Fd3())+V-=-=-?@KKM	Y//1C1CDY//1C1CD**I,=,=>9j))Y//1C1CD *r   c                   V P                  V P                  4      pVR ,          R,          pVR,          pVR,          pVP                  V4      pV P                  WS4       V P	                  VP                  4       4       V P	                  VP                  4       4       V P	                  VP                  4       4       V P                  VP                  4       4       V P                  VP                  4       VP                  4       4       R# )r  r  r  r  N	r   r  r  ri   r}  r  
is_symlinkr{  r  r   r  r  r   real_targetresults   &     r   "test_copy_file_to_existing_symlink+PathTest.test_copy_file_to_existing_symlinkC  s    xx		"(WnV$(())+,**,-//12))+[-B-B-DEr   c                   V P                  V P                  4      pVR ,          R,          pVR,          pVR,          pVP                  VRR7      pV P                  WS4       V P	                  VP                  4       4       V P	                  VP                  4       4       V P	                  VP                  4       4       V P                  VP                  4       4       V P                  VP                  4       VP                  4       4       R# )r  r  r  r  Ffollow_symlinksNr  r  s   &     r   8test_copy_file_to_existing_symlink_follow_symlinks_falseAPathTest.test_copy_file_to_existing_symlink_follow_symlinks_falseQ  s    xx		"(WnVU;(())+,**,-//12))+[-B-B-DEr   c                   V P                  V P                  4      pVR ,          p\        P                  ! VRR4       VR,          pVP	                  VRR7       V P                  \        P                  ! VR4      R4       R# )r     user.foo   42r  Tr  N)r   r  r   setxattrr  ri   getxattrr   r  r  r   s   &   r   'test_copy_file_preserve_metadata_xattrs0PathTest.test_copy_file_preserve_metadata_xattrs_  sa    xx		"
FK/Fd3V[95Ar   c                |   V P                  V P                  4      pVR ,          pVR,          pVP                  V4      pV P                  WC4       V P	                  VP                  4       4       V P                  VP                  4       4       V P                  VP                  4       VP                  4       4       R# )r  r  N)	r   r  r  ri   r}  r  r{  r  r  r   r  r  r   r  s   &    r   &test_copy_symlink_follow_symlinks_true/PathTest.test_copy_symlink_follow_symlinks_trueh  s    xx		"V$((**,-))+V-=-=-?@r   c                   V P                  V P                  4      pVR ,          pVR,          pVP                  VRR7      pV P                  WC4       V P	                  VP                  4       4       V P	                  VP                  4       4       V P                  VP                  4       VP                  4       4       R# )r  r  Fr  Nr   r  r  ri   r}  r  r  r  r  s   &    r   'test_copy_symlink_follow_symlinks_false0PathTest.test_copy_symlink_follow_symlinks_falses      xx		"VU;(())+,*FOO,=>r   c                    V P                  V P                  4      pVR ,          pV P                  \        VP                  V4       R# r  Nr   r  r   r   r  r   r  r  s   &  r   test_copy_symlink_to_itself$PathTest.test_copy_symlink_to_itself~  3    xx		"'6;;7r   c                H   V P                  V P                  4      pVR ,          pVR,          pVP                  VR,          4       VP                  VR,          4       V P                  \        VP
                  V4       V P                  \        VP
                  VRR7       R# 
copySource
copyTargetr  r  Fr  Nr   r  
symlink_tor   r   r  r  s   &   r   %test_copy_symlink_to_existing_symlink.PathTest.test_copy_symlink_to_existing_symlink  }    xx		"$$$.)$-('6;;7'6;;Nr   c                H   V P                  V P                  4      pVR ,          pVR,          pVP                  VR,          4       VP                  VR,          4       V P                  \        VP
                  V4       V P                  \        VP
                  VRR7       R# r  r  r  s   &   r   /test_copy_symlink_to_existing_directory_symlink8PathTest.test_copy_symlink_to_existing_directory_symlink  r  r   c                   V P                  V P                  4      pVR ,          pVR,          pVP                  VRR7      pV P                  WC4       V P	                  VP                  4       4       V P	                  VP                  4       4       V P                  VP                  4       VP                  4       4       R# )r!  r  Fr  Nr  r  s   &    r   1test_copy_directory_symlink_follow_symlinks_false:PathTest.test_copy_directory_symlink_follow_symlinks_false  r  r   c                    V P                  V P                  4      pVR ,          pV P                  \        VP                  V4       V P                  \        VP                  VRR7       R# )r!  Fr  Nr  r  s   &  r   %test_copy_directory_symlink_to_itself.PathTest.test_copy_directory_symlink_to_itself  sN    xx		"'6;;7'6;;Nr   c                4   V P                  V P                  4      pVR ,          pVR ,          R,          pV P                  \        VP                  V4       V P                  \        VP                  VRR7       V P                  VP                  4       4       R# )r!  copyBFr  N)r   r  r   r   r  r{  r  r  s   &   r   'test_copy_directory_symlink_into_itself0PathTest.test_copy_directory_symlink_into_itself  sp    xx		"')'6;;7'6;;N)r   c                H   V P                  V P                  4      pVR ,          pVR,          pVP                  VR,          4       VP                  VR,          4       V P                  \        VP
                  V4       V P                  \        VP
                  VRR7       R# )r  r  r  r  Fr  Nr   r  r  r   FileExistsErrorr  r  s   &   r   /test_copy_directory_symlink_to_existing_symlink8PathTest.test_copy_directory_symlink_to_existing_symlink  s~    xx		"$$$-($.)/6;;?/6;;PUVr   c                V   V P                  V P                  4      pVR ,          pVR,          pVP                  VR,          R,          4       VP                  VR,          4       V P                  \        VP
                  V4       V P                  \        VP
                  VRR7       R# )r  r  r  r  Fr  Nr  r  s   &   r   9test_copy_directory_symlink_to_existing_directory_symlinkBPathTest.test_copy_directory_symlink_to_existing_directory_symlink  s    xx		"$$$-&01$-(/6;;?/6;;PUVr   c                4   V P                  V P                  4      pVR ,          pVR,          pVP                  4        VP                  R4      P	                  R4       V P                  \        VP                  V4       VR,          pVP                  VRR7      pV P                  WT4       V P                  VP                  R4      P                  4       4       V P                  VP                  R4      P                  4       V P                  R4      4       R# )r  r   linknonexistenttarget2Fr  N)r   r  r)  r   r  r   r7  r  ri   r}  r  r  )r   r  r  r   r  r  s   &     r   test_copy_dangling_symlink#PathTest.test_copy_dangling_symlink  s    xx		"**=9+V[[&A"We<)((0;;=>))&1::<dhh}>UVr   c                :   V P                  V P                  4      pVR ,          p\        \        R4      '       d;   \        P                  ! V\
        P                  \
        P                  ,          4       \        \        R4      '       d<   \        \
        R4      '       d&   \        P                  ! V\
        P                  4       VP                  4       pVR,          pVP                  VRRR7       V P                  VP                  4       4       V P                  VP                  4       4       V P                  VP!                  4       VP!                  4       4       VP                  4       pV P#                  VP$                  VP$                  4       V P#                  VP&                  VP&                  4       V P                  VP(                  VP(                  4       \        VR4      '       d)   V P                  VP*                  VP*                  4       R	# R	# )
r  lchmodlchflagsr  r  FT)r  r  r  N)r   r  r  r   r  r  r  r  r  r  lstatr  r}  r  r  ri   r  r  r  r  r  r  r  s   &     r    test_copy_link_preserve_metadata)PathTest.test_copy_link_preserve_metadata  sh   xx		"2x  IIfdllT\\9:2z""wt['A'AKK/LLN	FETJ())+,*FOO,=>LLN	Y//1C1CDY//1C1CD**I,=,=>9j))Y//1C1CD *r   c           
         R  pV P                  V P                  4      pVR,          pVR,          p\        P                  ! 4       ;_uu_ 4       p\        '       dQ   \        \        R4      '       d;   VP                  \        P                  ! RV! \        P                  4      4      4       \        '       dQ   \        \        R4      '       d;   VP                  \        P                  ! RV! \        P                  4      4      4       \        \        R4      '       d;   VP                  \        P                  ! RV! \        P                  4      4      4       \        \        R	4      '       d;   VP                  \        P                  ! R
V! \        P                  4      4      4       VP                  V4       V P!                  VP#                  4       4       V P%                  VP'                  4       VP'                  4       4       RRR4       \        '       d   \        \        R4      '       d   RpMY\        '       d   \        \        R4      '       d   RpM4\        \        R4      '       d   RpM\        \        R	4      '       d   R
pMR# \        P                  ! Wa! \        P(                  4      4      ;_uu_ 4        V P+                  \,        VP                  V4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)c                    a  V 3R  lpV# )c                  D   < \        S\        P                  ! S4      4      hr   )r   r   strerror)rm   r;  errs   *,r   raiserFPathTest.test_copy_error_handling.<locals>.make_raiser.<locals>.raiser  s    c2;;s#344r   r#   )r  r  s   f r   make_raiser6PathTest.test_copy_error_handling.<locals>.make_raiser  s    5Mr   r  r  FICLONEzfcntl.ioctl
_fcopyfilezposix._fcopyfilecopy_file_rangezos.copy_file_rangesendfilezos.sendfileN)r   r  
contextlib	ExitStackfcntlr  enter_contextr   rk  r   r   r  ENOTSUPr   ENOTSOCKr  r}  r  ri   r  r9  r   r7  )r   r  r  r  r   ctx
patchpoints   &      r   test_copy_error_handling!PathTest.test_copy_error_handling  s   	
 xx		" !!##su	22!!$**]K<T"UVu55!!$**-?U]]A["\]r,--!!$**-A;u{{C["\]r:&&!!$**]K<W"XYKKOOFMMO,V--/1A1A1CD $ 5WUI..&JUwul33+JR*++-JR$$&JZZ
K$=>>/fE ?>3 $#2 ?>>s    A(K)7EK)="K<)K9	<L	win32wasiz3directories are always readable on Windows and WASIztest fails with root privilegec                    V P                  V P                  4      pVR ,          pVR,          pV P                  \        VP                  V4       V P                  VP                  4       4       R# )r  copyEN)r   r  r   PermissionErrorr  r{  r  r  s   &   r    test_copy_dir_no_read_permission)PathTest.test_copy_dir_no_read_permission  sR     xx		"/6;;?)r   c                4   V P                  V P                  4      pVR ,          p\        \        R4      '       dB   \        P                  ! VR,          \
        P                  \
        P                  ,          4       \        \        R4      '       dC   \        \
        R4      '       d-   \        P                  ! VR,          \
        P                  4       VR,          p. ROpV Uu. uF!  qRP                  V4      P                  4       NK#  	  ppVP                  VRR7       V Uu. uF!  qSP                  V4      P                  4       NK#  	  pp\        Wg4       F  w  rV P                  VP                  V	P                  4       V P                  VP                  V	P                  4       V P!                  VP"                  V	P"                  4       \        VR	4      '       g   K  V P!                  VP$                  V	P$                  4       K  	  R
# u upi u upi )r  r-  r  r  r  r  r  Tr  r  N)rP   r  r  
dirD/fileD)r   r  r  r   r-  r  r  r  r  r  r   r  zipr  r  r  ri   r  r  )
r   r  r  r   subpathssubpath
source_sts
target_stsr  r  s
   &         r   test_copy_dir_preserve_metadata(PathTest.test_copy_dir_preserve_metadata  sx   xx		"2wHHVf_dllT\\&AB2y!!gdK&@&@JJv'87EMNX'oog.335X
NFd3EMNX'oog.335X
N$'
$? I  !3!3Y5G5GH  !3!3Y5G5GHY..	0A0ABy*--  !3!3Y5G5GH %@	 ONs   %'H%'Hc                L   V P                  V P                  4      pVR ,          pVP                  RR4      p\        P                  ! VRR4       VR,          pVP                  VRR7       VP                  RR4      pV P                  \        P                  ! VR4      R4       R# )	r  r  r  r  r  r  Tr  N)r   r  r   r   r  r  ri   r  )r   r  r  source_filer   target_files   &     r   &test_copy_dir_preserve_metadata_xattrs/PathTest.test_copy_dir_preserve_metadata_xattrs2  s    xx		"oofg6
Ke4Fd3oofg6[+>Fr   c                ~   V P                  V P                  4      pVR ,          pVP                  4       pVR,          pVP                  V4      pV P	                  WT4       V P                  VP                  4       4       V P                  VP                  4       4       V P	                  W4P                  4       4       R# )r  linkA_movedN	r   r  r  moveri   r{  r  r}  r  r   r  r  source_readlinkr   r  s   &     r   test_move_file_symlinkPathTest.test_move_file_symlink=      xx		" //+%V$()))+,//*;<r   c                    V P                  V P                  4      pVR ,          pV P                  \        VP                  V4       R# r  r   r  r   r   rF  r  s   &  r    test_move_file_symlink_to_itself)PathTest.test_move_file_symlink_to_itselfI  r  r   c                ~   V P                  V P                  4      pVR ,          pVP                  4       pVR,          pVP                  V4      pV P	                  WT4       V P                  VP                  4       4       V P                  VP                  4       4       V P	                  W4P                  4       4       R# )r!  linkB_movedNrE  rG  s   &     r   test_move_dir_symlinkPathTest.test_move_dir_symlinkO  rK  r   c                    V P                  V P                  4      pVR ,          pV P                  \        VP                  V4       R# )r!  NrM  r  s   &  r   test_move_dir_symlink_to_itself(PathTest.test_move_dir_symlink_to_itself[  r  r   c                ~   V P                  V P                  4      pVR ,          pVP                  4       pVR,          pVP                  V4      pV P	                  WT4       V P                  VP                  4       4       V P                  VP                  4       4       V P	                  W4P                  4       4       R# )r   brokenLink_movedNrE  rG  s   &     r   test_move_dangling_symlink#PathTest.test_move_dangling_symlinka  s    xx		"$ //+**V$()))+,//*;<r   c                ~   V P                  V P                  4      pVR ,          pVP                  4       pVR,          pVP                  V4      pV P	                  WT4       V P                  VP                  4       4       V P                  VP                  4       4       V P	                  W4P                  4       4       R# )r  fileA_movedNr   r  r  rF  ri   r{  r  r}  r   r  r  source_textr   r  s   &     r   test_move_filePathTest.test_move_filem  s    xx		"&&(%V$()(&6&6&89r   c                &    V P                  4        R # r   )r`  r:   s   &r   test_move_file_other_fs PathTest.test_move_file_other_fsx      r   c                   V P                  V P                  4      pVR ,          pVP                  4       pVR,          R,          pVP                  V4      pV P	                  WT4       V P                  VP                  4       4       V P                  VP                  4       4       V P	                  W4P                  4       4       R# )r  r  r  Nr]  r^  s   &     r   test_move_file_to_filePathTest.test_move_file_to_file|  s    xx		"&&((V$()(&6&6&89r   c                &    V P                  4        R # r   )rg  r:   s   &r   test_move_file_to_file_other_fs(PathTest.test_move_file_to_file_other_fs  s    ##%r   c                    V P                  V P                  4      pVR ,          pVR,          pV P                  \        VP                  V4       R# )r  r  NrM  r  s   &   r   test_move_file_to_dirPathTest.test_move_file_to_dir  s<    xx		"'6;;7r   c                &    V P                  4        R # r   )rm  r:   s   &r   test_move_file_to_dir_other_fs'PathTest.test_move_file_to_dir_other_fs  s    ""$r   c                    V P                  V P                  4      pVR ,          pV P                  \        VP                  V4       R# r  NrM  r  s   &  r   test_move_file_to_itself!PathTest.test_move_file_to_itself  s3    xx		"'6;;7r   c                   V P                  V P                  4      pVR ,          pVR,          pVP                  V4      pV P                  WC4       V P	                  VP                  4       4       V P                  VP                  4       4       V P                  VP                  R4      P                  4       4       V P                  VP                  RR4      P                  4       4       V P                  VP                  RR4      P                  4       R4       V P                  VP                  R4      P                  4       4       V P                  VP                  R4      P                  4       R4       R# )r  
dirC_movedr  r  zthis is file D
r  zthis is file C
N)r   r  rF  ri   r{  r  r}  is_dirr   is_filer  r  s   &    r   test_move_dirPathTest.test_move_dir  s   xx		"$V$()(/66898@@BC9CCE+	-088:;0::<*	,r   c                &    V P                  4        R # r   )rz  r:   s   &r   test_move_dir_other_fsPathTest.test_move_dir_other_fs  s    r   c                   V P                  V P                  4      pVR ,          pVR,          pV P                  \        VP                  V4       V P                  VP                  4       4       V P                  VP                  4       4       R# )r  r  Nr   r  r   r   rF  r}  r  r  s   &   r   test_move_dir_to_dirPathTest.test_move_dir_to_dir  s`    xx		"'6;;7((r   c                &    V P                  4        R # r   )r  r:   s   &r   test_move_dir_to_dir_other_fs&PathTest.test_move_dir_to_dir_other_fs  s    !!#r   c                    V P                  V P                  4      pVR ,          pV P                  \        VP                  V4       V P                  VP                  4       4       R# )r  Nr  r  s   &  r   test_move_dir_to_itself PathTest.test_move_dir_to_itself  sE    xx		"'6;;7(r   c                ,   V P                  V P                  4      pVR ,          pVR ,          R,          pV P                  \        VP                  V4       V P                  VP                  4       4       V P                  VP                  4       4       R# )r  barN)r   r  r   r   rF  r}  r  r{  r  s   &   r   test_move_dir_into_itself"PathTest.test_move_dir_into_itself  sg    xx		"&'6;;7()r   c                &    V P                  4        R # r   )r  r:   s   &r   "test_move_dir_into_itself_other_fs+PathTest.test_move_dir_into_itself_other_fs      &&(r   c                &    V P                  4        R # r   )rI  r:   s   &r   test_move_file_symlink_other_fs(PathTest.test_move_file_symlink_other_fs  s     	##%r   c                &    V P                  4        R # r   )rN  r:   s   &r   )test_move_file_symlink_to_itself_other_fs2PathTest.test_move_file_symlink_to_itself_other_fs  s     	--/r   c                &    V P                  4        R # r   )rR  r:   s   &r   test_move_dir_symlink_other_fs'PathTest.test_move_dir_symlink_other_fs  s     	""$r   c                &    V P                  4        R # r   )rU  r:   s   &r   (test_move_dir_symlink_to_itself_other_fs1PathTest.test_move_dir_symlink_to_itself_other_fs  s     	,,.r   c                &    V P                  4        R # r   )rY  r:   s   &r   #test_move_dangling_symlink_other_fs,PathTest.test_move_dangling_symlink_other_fs  s     	'')r   c                   V P                  V P                  4      pVR ,          pVP                  4       pVR,          pVP                  V4      pV P	                  WTR ,          4       V P                  VP                  4       4       V P                  VP                  4       4       V P	                  W5P                  4       4       R# )r  r  N)r   r  r  	move_intori   r{  r  r}  )r   r  r  r_  
target_dirr  s   &     r   test_move_intoPathTest.test_move_into  s    xx		"&&(F]
!!*-g!56)(&6&6&89r   c                &    V P                  4        R # r   )r  r:   s   &r   test_move_into_other_os PathTest.test_move_into_other_os  re  r   c                    V P                  R 4      pV P                  pV P                  \        VP                  V4       R# )rs   N)r   r  r   r5  r  )r   r  r  s   &  r   test_move_into_empty_name"PathTest.test_move_into_empty_name  s0    "YY
*f&6&6
Cr   c                &    V P                  4        R # r   )r  r:   s   &r   "test_move_into_empty_name_other_os+PathTest.test_move_into_empty_name_other_os  r  r   c                <    V P                  V P                  4       R # r   )_check_complex_symlinksr  r:   s   &r   test_complex_symlinks_absolute'PathTest.test_complex_symlinks_absolute  s    $$TYY/r   c                (    V P                  R 4       R# )rP   N)r  r:   s   &r   test_complex_symlinks_relative'PathTest.test_complex_symlinks_relative  s    $$S)r   c                \    V P                  V P                  P                  R R4      4       R# )r  r  N)r  rU   r*  r:   s   &r   &test_complex_symlinks_relative_dot_dot/PathTest.test_complex_symlinks_relative_dot_dot  s!    $$T[[%5%5fd%CDr   c                   V P                   pV P                  V P                  4      pVP                  R 4      P	                  VP                  RR4      RR7       VP                  R4      P	                  VP                  R R 4      RR7       VP                  R4      P	                  VP                  RR4      RR7       VP                  R4      P	                  VRR7       VR,          P                  4       pV P                  WC4       V P                  \        V4      V P                  4       VR ,          P                  4       pV P                  WC4       V P                  \        V4      V P                  4       VR,          P                  4       pV P                  WC4       V P                  \        V4      V P                  4       VR,          P                  4       pV P                  WC4       V P                  \        V4      V P                  4       \        P                  ! 4       p\        P                  ! V P                  4        V P                  R4      P                  4       pV P                  WC4       V P                  \        V4      V P                  4       V P                  R 4      P                  4       pV P                  WC4       V P                  \        V4      V P                  4       V P                  R4      P                  4       pV P                  WC4       V P                  \        V4      V P                  4       V P                  R4      P                  4       pV P                  WC4       V P                  \        V4      V P                  4       \        P                  ! V4       R#   \        P                  ! T4       i ; i)link1link0Tr"  link2link3N)rU   r   r  r   r  r*  r  ri   rC  rh   r   rK  chdir)r   link0_targetrU   rn   r[   old_paths   &&    r   r   PathTest._check_complex_symlinks	  s   HHTYY	

7&&v{{7G'DZ^&_	

7&&v{{7G'DZ^&_	

7&&v{{7G'DZ^&_	

7&&|&N [!!#  Q3[!!#  Q3[!!#  Q3[!!#  Q3 99;
	!))+AQ"$$SVTYY7!))+AQ"$$SVTYY7!))+AQ"$$SVTYY7!))+AQ"$$SVTYY7HHXBHHXs   
EN6 6Oc                J    VP                  V4      pV P                  WB4       R # r   )r  ri   )r   r[   r   strictr   s   &&&& r   _check_resolvePathTest._check_resolve3  s    IIf%r   c                r	   V P                   pV! V P                  R 4      pV P                  \        4      ;_uu_ 4       pVP	                  RR7       RRR4       V P                  XP                  P                  \        P                  4       V P                  pV P                  \        VP	                  RR7      4      VP                  V P                  R 4      4       V! V P                  R RR4      pV P                  \        VP	                  RR7      4      VP                  V P                  R RR4      4       V! V P                  RR RR4      pV P                  \        VP	                  RR7      4      VP                  VP                  V P                  4      R RR4      4       V! V P                  RR	4      pV P                  W"4       V! V P                  R
4      pV P                  W!! V P                  R4      4       V! V P                  RRR	4      pV P                  W!! V P                  RR	4      4       V! V P                  RRR	4      pV P                  W!! V P                  RR	4      4       V! V P                  RRR	R RR4      pV P                  W!! V P                  RR	R RR4      R4       V! V P                  RRRR RR4      pV P                   P                  \        Jd(   V P                  W!! V P                  RR RR4      R4       M%V P                  W!! V P                  R RR4      R4       V P!                  4       pV! V P                  RR4      P#                  V4       V! V P                  \        V4      R4      P#                  V P                  P                  V P                  R4      4       V! V P                  RRRR	4      pV P%                  W!! V P                  RR	4      4       V! V P                  RRRR RR4      pV P                  W!! V P                  RR RR4      R4       V! V P                  RRRRR RR4      pV P                   P                  \        Jd   V P                  W!! VR RR4      R4       R# V P                  W!! V P                  R RR4      R4       R#   + '       g   i     EL^; i)r  Tr  NFinspamr  r  r  r  r  r  r$  r%  linkXlinkY)r   r  r   r   r  ri   r8  r   r9  rU   rC  rh   r*  dirname_check_resolve_relativerV   rM  r  _check_resolve_absolute)r   rn   r[   r<  rU   r   s   &     r   test_resolve_commonPathTest.test_resolve_common:  s   HHdiiw''2IITI" (++U\\:  QYYeY%<!=!'TYY!>	@diif-  QYYeY%<!=!'TYYtV!L	NdiiudF3  QYYeY%<!=!'V^^DII-FtU[!\	^ dii)$$Q*dii!$$Q$))W(=>dii'2$$Q$))VW(EFdii'2$$Q$))VW(EFdii'5$G$$Q$))VWeT*0)238	:dii$tVD88??)+ ((Adii.4-67<>
 ((Adiif,MuULLN	$))VW%003	$))SVW%001A1A$))V1TUdii'7;$$Q$))VW(EFdii'5$G$$Q$))VUD&(Q%*	,dii'4fM88??)+ ((Aaf,EuM ((Adiif,MuUm (''s   R%%R6	c                z   V P                   pV P                  V P                  4      pVP                  R 4      P	                  RRR7       VP                  R4      P	                  VP                  R R 4      RR7       VP                  R4      P	                  VP                  RR4      RR7       VR,          pV P                  VP                  RR7      V4       VR,          R,          pV P                  \        VP                  RR7       V P                  VP                  R	R7      VR,          R,          4       R
# )0rP   Tr"  12r  34FN)
rU   r   r  r   r  r*  ri   r  r   r7  )r   rU   r[   r   r   s   &    r   test_resolve_dotPathTest.test_resolve_dotv  s     HHTYY	

3""3D"A	

3""6;;sC#8d"S	

3""6;;sC#8d"SG$/3GcM+QYYtD%0!c'C-@r   c                $   V P                   ! V!  pV P                  \        4      ;_uu_ 4       pVP                  R R7       RRR4       V P	                  XP
                  P                  \        P                  4       R#   + '       g   i     LF; i)Tr  N)r   r   r   r  ri   r8  r   ELOOP)r   rm   r   r<  s   &*  r   _check_symlink_loopPathTest._check_symlink_loop  s\    xxw''2LLL% (++U[[9 ('s   A??B	c                .   V P                  V P                  R 4      P                  R4       V P                  V P                  R 4       V P                  V P                  R4      P                  R4       V P                  V P                  R4       V P                  V P                  R4      P                  R4       V P                  V P                  R4       V P                  V P                  RR4      pV P	                  VP                  RR7      V4       V P                  V P                  R4      P                  V P                  P                  V P                  R	4      4       V P                  V P                  R4       V P                  V P                  R
4      P                  V P                  P                  V P                  R
4      4       V P                  V P                  R
4       V P                  V P                  R4      P                  V P                  P                  V P                  R4      4       V P                  V P                  R4       V P                  V P                  RR4      pV P	                  VP                  RR7      V4       R# )r  zlinkX/insider  linkZzlinkZ/../linkZr  Fr  linkUzlinkU/insidelinkVlinkWzlinkW/../linkWN)r   r  r  r  ri   r  rU   r*  r   s   &  r   test_resolve_loopPathTest.test_resolve_loop  s    	G$//?  G4G$//8  G4G$//0@A  G4HHTYY/%0!4G$//0@0@N0[\  G4G$//0@0@G0TU  G4G$//0@0@L\0]^  G4HHTYY/%0!4r   c                l   V P                  R R4      p\        P                  ! 4       p\        P                  ! V P                  4        V P                  VP                  4       V P                  V P                  V4      4       \        P                  ! V4       R#   \        P                  ! T4       i ; i)nonexistN)r   r   rK  r  r  ri   r  )r   r[   old_cwds   &  r   )test_resolve_nonexist_relative_issue386712PathTest.test_resolve_nonexist_relative_issue38671  sp    HHUG$))+
	QYY[$((499a*@AHHWBHHWs   	:B B3c                   V P                  V P                  4      pV P                  VR ,          P                  4       V P                  R4      4       V P                  VR,          P                  4       V P                  R4      4       V P                  VR,          P                  4       V P                  R4      4       V P                  VR,          R,          P                  4       V P                  R4      4       V P	                  \
        4      ;_uu_ 4        VR,          P                  4        RRR4       R#   + '       g   i     R# ; i)	r  r  r   r  r!  r  r%  z../dirBN)r   r  ri   r  r   r   r   s   & r   test_readlinkPathTest.test_readlink  s    HHTYY!g+//1488G3DE!l*446.1	3!g+//1488F3CD!g+/99;TXXi=PQw''[""$ ('''s   D::E	r  zos.readlink() is presentc                    V P                  V P                  4      pVR ,          pV P                  \        P                  4      ;_uu_ 4        \
        P                  V4       RRR4       R#   + '       g   i     R# ; irs  )r   r  r   r6   r7   r   r  r   s   &  r   test_readlink_unsupported"PathTest.test_readlink_unsupported  sN    HHTYYKw;;<<JJqM =<<<s   A,,A=	c                   V P                  V P                  4      R ,          pVP                  4       P                  pVR,          pVP	                  V4       V P                  VP                  4       P                  V4       V^,          pVP	                  V4       V P                  VP                  4       P                  V4       R# )r  Nm)r   r  r  r  r-  ri   )r   r[   modenew_modes   &   r   
test_chmodPathTest.test_chmod  s    HHTYY')vvx&=	))84%<	))84r   c                   V P                  V P                  4      R ,          pVP                  4       pVP                  4       P                  pVR,          pVP                  VRR7       V P                  VP                  4       P                  V4       V^,          pVP                  VRR7       V P                  VP                  4       P                  V4       R# )r  Tr  Nr  )r   r  r  r  r  r-  ri   )r   r[   r   r  r  s   &    r   test_chmod_follow_symlinks_true(PathTest.test_chmod_follow_symlinks_true  s     HHTYY')IIKvvx&=	$/))84%<	$/))84r   c                     \         P                  ! V4      P                  #   \         d    T P	                  R T,          4        R# i ; i)z4user %d doesn't have an entry in the system databaseN)pwdgetpwuidpw_nameKeyErrorrW   )r   uids   &&r   _get_pw_name_or_skip_test"PathTest._get_pw_name_or_skip_test  sC    	N<<$,,, 	NMMFLN	N   " #A	A	z&the pwd module is needed for this testc                    V P                  V P                  4      R ,          pVP                  4       P                  pV P	                  V4      pV P                  W1P                  4       4       R# rs  )r   r  r  st_uidr  ri   owner)r   r[   expected_uidexpected_names   &   r   
test_ownerPathTest.test_owner  L    HHTYY')vvx66|D	2r   ztest needs root privilegec                h   \         P                  ! 4        Uu. uF  qP                  NK  	  pp\        V4      ^8  d   V P	                  R4       V P                  V P                  4      R,          pV P                  V P                  4      R,          pVR,          w  rV\        P                  ! W5R4       \        P                  ! WFRRR7       VP                  RR7      P                  pV P                  V4      pV P                  Wv4       V P                  WP                  RR7      4       R# u upi )	   ztest needs more than one userr  r  Nr
  NFr  NrR   )r  getpwallpw_uidr   rW   r   r  r   chownr  r  r  ri   r  )	r   u	all_usersr   r  uid_1uid_2r  r  s	   &        r   test_owner_no_follow_symlinks&PathTest.test_owner_no_follow_symlinks  s     (+||~6~!XX~	6y>AMM9:$))$w.xx		"W, }
#
b%8yyy7>>66|D-

5
(IJ 7s   D/c                     \         P                  ! V4      P                  #   \         d    T P	                  R T,          4        R# i ; i)z5group %d doesn't have an entry in the system databaseN)grpgetgrgidgr_namer  rW   )r   gids   &&r   _get_gr_name_or_skip_test"PathTest._get_gr_name_or_skip_test  sC    	O<<$,,, 	OMMG#MO	Or   z&the grp module is needed for this testc                    V P                  V P                  4      R ,          pVP                  4       P                  pV P	                  V4      pV P                  W1P                  4       4       R# rs  )r   r  r  st_gidr  ri   group)r   r[   expected_gidr  s   &   r   
test_groupPathTest.test_group  r  r   c                l   \         P                  ! 4        Uu. uF  qP                  NK  	  pp\        V4      ^8  d   V P	                  R4       V P                  V P                  4      R,          pV P                  V P                  4      R,          pVR,          w  rV\        P                  ! VRV4       \        P                  ! VRVRR7       VP                  RR7      P                  pV P                  V4      pV P                  Wv4       V P                  WP                  RR7      4       R# u upi )	r
  ztest needs more than one groupr  r  r  Fr  NrR   )r  getgrallgr_gidr   rW   r   r  r   r  r  r  r  ri   r  )	r   g
all_groupsr   r  gid_1gid_2r  r  s	   &        r   test_group_no_follow_symlinks&PathTest.test_group_no_follow_symlinks  s     ),71hh
7z?QMM:;$))$w.xx		"W,!"~
U#
r5%8yyy7>>66|D-

5
(IJ 8s   D1c                    V P                  V P                  4      R ,          pVP                  4        V P                  VP                  4       V P                  VP                  4       R# rs  )r   r  unlinkr=  r  r   s   & r   test_unlinkPathTest.test_unlink$  sF    HHTYY')	
')r   c                    V P                  V P                  4      R ,          pV P                  VP                  4       VP                  RR7       R# )fileAAAT)
missing_okN)r   r  r=  r,  r   s   & r   test_unlink_missing_okPathTest.test_unlink_missing_ok*  s9    HHTYY)+)	D!r   c                $   V P                  V P                  4      R ,          pVP                  4        F  pVP                  4        K  	  VP	                  4        V P                  VP                  4       V P                  VP                  4       R# )r  N)r   r  r  r,  rmdirr=  r  r   s   &  r   
test_rmdirPathTest.test_rmdir/  s_    HHTYY&(AHHJ 		')r   c                    V P                  V P                  4      R ,          pVP                  4        V P                  VP	                  4       4       V P                  VP                  4       R# rs  )r   r  _deleter{  r  r=  r   s   & r   test_delete_filePathTest.test_delete_file7  sH    HHTYY')			$		*r   c                   V P                  V P                  4      pVP                  R 4      P                  4        V P	                  VP                  R 4      P                  4       4       V P	                  VP                  R R4      P                  RR7      4       VP                  R4      P                  4        V P	                  VP                  R4      P                  4       4       V P	                  VP                  RR4      P                  4       4       V P	                  VP                  RR4      P                  RR7      4       VP                  R4      P                  4        V P	                  VP                  R4      P                  4       4       V P	                  VP                  RR4      P                  4       4       V P	                  VP                  RRR	4      P                  4       4       V P	                  VP                  RR
4      P                  4       4       V P	                  VP                  RR4      P                  4       4       R# )r  r$  Fr  r  r  r%  r  r  r  r  r  N)r   r  r   r9  r{  r  )r   r  s   & r   test_delete_dirPathTest.test_delete_dir=  s   xx		"f%%'v.5578vw7>>! ? # 	$f%%'v.5578vw7>>@Avw7>>! ? # 	$f%%'v.5578vv6==?@vvw?FFHIvw7>>@Av{;BBDEr   c                    V P                  V P                  R 4      pVP                  4        VR,          pV P                  \        VP
                  4       R# )deleter  N)r   r  r)  r   r7  r9  )r   tmpfilenames   &  r   test_delete_missingPathTest.test_delete_missingO  s?    hhtyy(+		;+X-=-=>r   c                d   V P                  V P                  R 4      pVP                  4        VR,          pVP                  4        VR,          pVP                  V4       VP	                  4        V P                  VP                  4       4       V P                  VP                  RR7      4       R# )r@  rG  r  Fr  N)r   r  r)  r  r9  r}  r  r{  )r   rA  dir_r  s   &   r   test_delete_symlinkPathTest.test_delete_symlinkV  sz    hhtyy(+		U{

V|&U;<r   c                t   V P                  V P                  R 4      pVP                  4        VR,          pVR,          pVR,          pW#V3 F  pVP                  4        K  	  VR,          pVP                  R4       VR,          pVP	                  V4       VR,          pVP	                  V4       VR,          p	V	P	                  V4       VP                  4        V P                  VP                  4       4       V P                  VP                  4       4       V P                  VP                  4       4       R	# )
r@  dir1dir2dir3file1r  r  r  r  N)	r   r  r)  
write_textr  r9  r{  r  r}  )
r   rA  rJ  rK  rL  r   rM  r  r  r  s
   &         r   test_delete_inner_symlink"PathTest.test_delete_inner_symlinkb  s    hhtyy(+		V|f}V|T!AGGI "gwww'&'r   :N   Ncygwinz2This test can't be run on Cygwin (issue #1071513).c                (   V P                  V P                  R 4      pVP                  4        VR,          pVR,          pVP                  R4       VP                  4        VP	                  4       P
                  pVP	                  4       P
                  pVP	                  4       P
                  p\        P                  \        P                  ,          p VP                  V4       VP                  V4       VP                  V4       V P                  \        VP                  4       VP                  V4       VP                  V4       VP                  V4       R#   TP                  T4       TP                  T4       TP                  T4       i ; i)r@  rQ   r   rs   N)r   r  r)  rN  r  r  S_IREADS_IEXECr-  r   r2  r9  )r   rA  child_file_pathchild_dir_pathold_dir_modeold_child_file_modeold_child_dir_moder  s   &       r   test_delete_unwritablePathTest.test_delete_unwritabley  s3   
 hhtyy(+		)s""2&xxz))-224<<+002::<<$,,.		5!!(+  *IIhos{{;IIl#!!"56  !34 IIl#!!"56  !34s   AE 5Fc                   ^ RI pV P                  V P                  R4      pVP                  4        VR,          pVR,          pVR,          pW4V3 F  pVP                  4        K  	  VR,          pVP	                  R4       VR,          pVP                  \        V4      \        V4      4       VR	,          p	VP                  \        V4      \        V	4      4       VR
,          p
VP                  \        V4      \        V
4      4       VP                  4        V P                  VP                  4       4       V P                  VP                  4       4       V P                  VP                  4       4       R# )r   Nr@  rJ  rK  rL  rM  r  r  r  r  _winapir   r  r)  rN  CreateJunctionrh   r9  r{  r  r}  )r   r_  rA  rJ  rK  rL  r   rM  r  r  r  s   &          r   test_delete_inner_junction#PathTest.test_delete_inner_junction  s   hhtyy(+		V|f}V|T!AGGI "gws4y#e*5ws4y#e*5ws5z3u:6'&'r   c                    ^ RI pV P                  V P                  R4      pVP                  4        VR,          pVR,          pVP                  4        VR,          pVP	                  R4       VP                  \        V4      \        V4      4       VP                  4        V P                  VP                  4       4       V P                  VP                  4       4       V P                  VP                  4       4       R# )r   Nr@  cheeseshopr  rs   r^  )r   r_  rA  srcdstr  s   &     r   test_delete_outer_junction#PathTest.test_delete_outer_junction  s    hhtyy(+		HnFl		V|s3xS2&&

%r   mkfifozrequires os.mkfifo()vxworksz%fifo requires special path on VxWorksc                   V P                  V P                  R 4      p\        P                  ! V4       VP	                  4        V P                  VP                  4       4       V P                  V P                  R4      pVP                  4        \        P                  ! VR,          4       VP	                  4        V P                  VP                  4       4       R# )piperG  mypipeN)r   r  r   rj  r9  r{  r  r)  r   s   & r   test_delete_on_named_pipe"PathTest.test_delete_on_named_pipe  s     HHTYY'
		!			$HHTYY&		
		!h,			$r   c                2  aa  \         P                  oV P                  V P                  R 4      oVV3R lpV\         n        SP	                  4        SR,          pVP                  R4       SP                  4        S\         n        R#   S\         n        i ; i)r@  c                 6   < V S8w  d   \        4       hS! V 4      # r   )r   )r*   rm   r;  
orig_lstatrA  s   &*,r   r  DPathTest.test_delete_does_not_choke_on_failing_lstat.<locals>.raiser  s    9!)O%b>)r   r  rs   N)r   r  r   r  r)  rN  r9  )r   r  r  rs  rA  s   &  @@r   +test_delete_does_not_choke_on_failing_lstat4PathTest.test_delete_does_not_choke_on_failing_lstat  si    	"J((499h/C* BHIIK+CNN2KKM!BHzBHs   A8B	 	Bc                   V P                  V P                  4      pVR ,          pVP                  4       P                  pVR,          R,          pVP	                  V4       V P                  VP                  4       P                  V4       V P                  \        P                  P                  W$4      4       V P                  VP                  4       4       VR,          R,          pV P                  P                  \        R 4      pVP	                  V4       V P                  \        P                  ! V4      P                  V4       V P                  VP                  4       4       R# r  r  fileAAr0  N)r   r  r  st_sizehardlink_tori   r}  r   r   samefiler  rU   r*  r   )r   rn   r   sizer  r  r  s   &      r   test_hardlink_toPathTest.test_hardlink_to  s    HHTYYW{{}$$6zH$ ,,d3((67(F
Y&++""673'")1148'r   r  zos.link() is presentc                   V P                  V P                  4      pVR ,          pVR,          R,          pV P                  \        P                  4      ;_uu_ 4        VP                  V4       RRR4       R#   + '       g   i     R# ; ir  r  ry  N)r   r  r   r6   r7   r{  r   rn   r[   r   s   &   r   test_hardlink_to_unsupported%PathTest.test_hardlink_to_unsupported  s]    HHTYYKJ!w;;<<MM! =<<<   A88B		c                   V P                  V P                  4      pVR ,          pVP                  4       P                  pVR,          R,          pVP	                  V4      pV P                  WT4       V P                  VP                  4       P                  V4       V P                  VP                  4       V P                  P                  \        R4      pVP	                  V4      pV P                  WpP                  V4      4       V P                  \        P                  ! V4      P                  V4       V P                  VP                  4       R# rx  )r   r  r  rz  r  ri   r=  rU   r*  r   r   )r   rn   r[   r}  r   	renamed_pr   	renamed_qs   &       r   test_renamePathTest.test_rename  s    HHTYYKvvxJ!HHQK	&))40'KKVY/HHQK	HHQK0++T2'r   c                   V P                  V P                  4      pVR ,          pVP                  4       P                  pVR,          R,          pVP	                  V4      pV P                  WT4       V P                  VP                  4       P                  V4       V P                  VP                  4       V P                  P                  \        RR4      pVP	                  V4      pV P                  WpP                  V4      4       V P                  \        P                  ! V4      P                  V4       V P                  VP                  4       R# )r  r  ry  r  r  N)r   r  r  rz  r   ri   r=  rU   r*  r   r   )r   rn   r[   r}  r   
replaced_pr   
replaced_qs   &       r   test_replacePathTest.test_replace	  s    HHTYYKvvxJ!YYq\
'))40'KKVVW5YYq\
XXa[1++T2'r   c                B   V P                  V P                  4      pVR ,          pV P                  VP                  4       4       VP	                  4        V P                  VP                  4       4       VP                  4       pVP                  pVP                  p\        P                  ! \        V4      V^
,
          V^
,
          34       VP	                  4        VP                  4       pV P                  VP                  V4       V P                  VP                  V4       VR,          pV P                  VP                  4       4       VP	                  RRR7       V P                  VP                  4       4       V P                  \        VP                  RR7       R# )newfileAnewfileBi  F)r  exist_okr  N)r   r  r{  r  touchr}  r  r  st_mtime_nsr   utimerh   r  r   r   )r   rn   r[   st	old_mtimeold_mtime_nss   &     r   test_touch_commonPathTest.test_touch_common	  s   HHTYY
N$		
#VVXKK	~~ 	Q)b.)b.9:		VVX=Y7
N$	UU+
#'177U;r   c                6   V P                  V P                  4      pVR ,          pVP                  4        VP                  R4      ;_uu_ 4       pV P	                  VP                  4       P                  4       R4       RRR4       R#   + '       g   i     R# ; i)r  r  r  N)r   r  r  r+  ri   r  r  )r   rn   r[   r/  s   &   r   test_touch_nochangePathTest.test_touch_nochange4	  s_    HHTYYK		VVD\\QQVVX^^-/@A \\\s   /BB	c                "   V P                  V P                  4      pVR ,          pV P                  VP                  4       4       VP	                  4        V P                  VP                  4       4       V P                  VP                  4       4       V P                  \        4      ;_uu_ 4       pVP	                  4        RRR4       V P                  XP                  P                  \        P                  4       R#   + '       g   i     LF; i)newdirAN)r   r  r{  r  r)  r}  rx  r   r   ri   r8  r   EEXIST)r   rn   r[   r<  s   &   r   
test_mkdirPathTest.test_mkdir;	  s    HHTYY	M$		
#
#w''2GGI (++U\\: ('s   /C>>D	c                   V P                  V P                  R R4      pV P                  VP                  4       4       V P	                  \
        4      ;_uu_ 4       pVP                  4        RRR4       V P                  XP                  P                  \        P                  4       VP                  RR7       V P                  VP                  4       4       V P                  VP                  4       4       V P	                  \
        4      ;_uu_ 4       pVP                  RR7       RRR4       V P                  VP                  P                  \        P                  4       \        P                  ! VP                  4       P                   4      pV P                  V P                  RR4      pVP                  RRR7       V P                  VP                  4       4       V P                  VP                  4       4       \"        P$                  R8w  dF   V P                  \        P                  ! VP                  4       P                   4      R	V,          4       V P                  \        P                  ! VP&                  P                  4       P                   4      V4       R#   + '       g   i     ELA; i  + '       g   i     EL; i)
newdirBnewdirCNTparentsnewdirDnewdirEim  r   im  )r   r  r{  r  r   r   r)  ri   r8  r   r9  r}  rx  r  r  S_IMODEr  r   rZ   parent)r   r[   r<  r  s   &   r   test_mkdir_parentsPathTest.test_mkdir_parentsF	  s   HHTYY	95$w''2GGI (++U\\:	
#
#w''2GGDG! (++U\\:||AFFH,,-HHTYY	95	t$
#
#77d?T\\!&&(*:*:;Vd]Kahhmmo&=&=>E' ('' (''s   J#J7#J4	7K	c                   V P                  V P                  R 4      pVP                  4       P                  pV P	                  VP                  4       4       V P	                  VP                  4       4       V P                  \        4      ;_uu_ 4       pVP                  4        RRR4       V P                  XP                  P                  \        P                  4       VP                  RR7       V P	                  VP                  4       4       V P                  VP                  4       P                  V4       R#   + '       g   i     L; i)r  NTr  )r   r  r  st_ctimer}  r  rx  r   r  r)  ri   r8  r   r  )r   r[   st_ctime_firstr<  s   &   r   test_mkdir_exist_okPathTest.test_mkdir_exist_ok_	  s    HHTYY'**
#
#//2GGI 0++U\\:	
#**N; 0/s   D<<E	c                   V P                  V P                  R 4      pV P                  VP                  4       4       V P	                  \
        4      ;_uu_ 4       pVP                  4        RRR4       V P                  XP                  P                  \        P                  4       VR,          pVP                  RR7       VP                  4       P                  pV P                  VP                  4       4       V P	                  \
        4      ;_uu_ 4       pVP                  RR7       RRR4       V P                  VP                  P                  \        P                  4       VP                  RRR7       V P                  VP                  4       4       V P                  VP                  4       P                  V4       R#   + '       g   i     ELc; i  + '       g   i     L; i)r  Nr  Tr  r  r  )r   r  r}  r  r   r  r)  ri   r8  r   r  r  r  )r   r[   r<  r  s   &   r   test_mkdir_exist_ok_with_parent(PathTest.test_mkdir_exist_ok_with_parentk	  s8   HHTYY'
#//2GGI 0++U\\:	M	**
#//2GGDG! 0++U\\:	t,
#**N; 0// 0/s   GGG	G(	c                    V P                  R 4      P                  4       P                  RR7       V P                  R 4      P                  4       P                  RRR7       R# )r   Tr  r  N)r   r  r)  r:   s   &r   test_mkdir_exist_ok_root!PathTest.test_mkdir_exist_ok_root|	  sH    %%t%4%%dT%Br   c                N   R  F3  pV P                  VR,           4      pVP                  4       '       d   K3   M	  V P                  R4       V P                  \        4      ;_uu_ 4        XR,          R,          P                  RR7       RRR4       R#   + '       g   i     R# ; i)ZYXWVUTSRQPONMLKJIHGFEDCBAz:\z&cannot find a drive that doesn't existchildr   Tr  N)r   rx  rW   r   r   r)  )r   r   r[   s   &  r   test_mkdir_with_unknown_drive&PathTest.test_mkdir_with_unknown_drive	  su    -AU#A88:: .
 MMBCw''[6!(((6 ('''s   (!BB$	c                |   V P                  V P                  R R4      pV P                  VP                  4       4       V P	                  \
        4      ;_uu_ 4       pVP                  RR7       RRR4       V P                  XP                  P                  \        P                  4       V P	                  \
        4      ;_uu_ 4       pVP                  RRR7       RRR4       V P                  VP                  P                  \        P                  4       R#   + '       g   i     L; i  + '       g   i     LY; i)r  r  Tr  Nr  r   r  r}  r  r   r  r)  ri   r8  r   r  r   r[   r<  s   &  r   test_mkdir_with_child_file#PathTest.test_mkdir_with_child_file	  s    HHTYY0
# //2GGDG! 0++U\\://2GGD4G0 0++U\\: 0/ 0/s   DD+D(	+D;	c                t   V P                  V P                  R 4      pV P                  VP                  4       4       V P	                  \
        4      ;_uu_ 4       pVP                  4        RRR4       V P                  XP                  P                  \        P                  4       V P	                  \
        4      ;_uu_ 4       pVP                  RR7       RRR4       V P                  VP                  P                  \        P                  4       R#   + '       g   i     L; i  + '       g   i     LY; i)r  NTr  r  r  s   &  r   test_mkdir_no_parents_file#PathTest.test_mkdir_no_parents_file	  s    HHTYY(
# //2GGI 0++U\\://2GGTG" 0++U\\: 0/ 0/s   DD'D$	'D7	c           	       aaa \        ^ 4       EF"  pV P                  V P                  RV,          4      pV P                  VP	                  4       4       \
        P                  oR
VVV3R llp\        ^4       Uu. uF  p\        V^V,          ,          4      NK  	  upo\        4       oVR,          R,          p \        P                  ! RV4      ;_uu_ 4        VP                  RRR7       R	R	R	4       V P                  \        V4      S4       V P                  VP	                  4       4       EK%  	  R	# u upi   + '       g   i     LV; i  \         d    T P                  \        T4      S4        Lfi ; i)    zdirCPC%dc                    < \        V 4      p SP                  4       '       d   S! W4       SP                  V 4       S! W4       R # r   )rh   popr'   )r   r  concurrently_createdpattern
real_mkdirs   &&r   my_mkdir@PathTest.test_mkdir_concurrent_parent_creation.<locals>.my_mkdir	  s7    4y ;;==t*(,,T24&r   rJ  rK  zos.mkdirTFr  N)r2  )r   r   r  r{  r  r   r)  boolsetr   rk  assertNotInrh   r  assertInr}  )	r   pattern_numr[   r  np12r  r  r  s	   &     @@@r   %test_mkdir_concurrent_parent_creation.PathTest.test_mkdir_concurrent_parent_creation	  s    9KJ$<=AQXXZ(J
' 
' >C1XFXtK1623XFG#&5 f*v%CAZZ
H55IIdUI; 6
   S+?@OOAHHJ'7 %" G 65" >c#h(<=>s0   <"D8<ED=/E=EE&E98E9c                0   V P                  V P                  4      pVR ,          pVR,          R,          pVP                  V4       V P                  VP	                  4       VP	                  4       4       V P                  VP                  4       VP	                  4       4       VR,          R,          pVP                  \        V4      4       V P                  VP	                  4       VP	                  4       4       V P                  VP                  4       VP	                  4       4       V P                  VP                  4       4       VR,          pVR,          R,          pVP                  VRR7       V P                  VP	                  4       VP	                  4       4       V P                  VP                  4       VP	                  4       4       V P                  VP                  4       4       V P                  \        VP                  4       4      4       R# )	r  r  linkAAlinkAAAr  linkAAAATr"  N)r   r  r  ri   r  r   r  rh   r{  rx  r}  listr  )r   rn   r   r  s   &   r   test_symlink_toPathTest.test_symlink_to	  sa   HHTYYW6zH$fkkm4DJJL&++-86zI%F$fkkm4DJJL&++-8'V6zJ&D9fkkm4DJJL&++-8&T\\^,-r   r.  zos.symlink() is presentc                   V P                  V P                  4      pVR ,          pVR,          R,          pV P                  \        P                  4      ;_uu_ 4        VP                  V4       RRR4       R#   + '       g   i     R# ; ir  )r   r  r   r6   r7   r  r  s   &   r   test_symlink_to_unsupported$PathTest.test_symlink_to_unsupported	  s\    HHTYYKJ!w;;<<LLO =<<<r  c                   V P                  V P                  4      pVR ,          pV P                  VP                  P	                  4       4       V P                  VP                  P	                  RR7      4       VP                  R4       V P                  VP                  P	                  4       4       V P                  VP                  P	                  RR7      4       R# myfileFr  hulloN)r   r  r{  infor  rN  r   s   &  r   test_info_exists_caching!PathTest.test_info_exists_caching	  s    HHTYYL)u=>	W)u=>r   c                   V P                  V P                  4      pVR ,          pV P                  VP                  P	                  4       4       V P                  VP                  P	                  RR7      4       VP                  4        V P                  VP                  P	                  4       4       V P                  VP                  P	                  RR7      4       R# )mydirFr  N)r   r  r{  r  rx  r)  r   s   &  r   test_info_is_dir_caching!PathTest.test_info_is_dir_caching	  s    HHTYYK)u=>		)u=>r   c                   V P                  V P                  4      pVR ,          pV P                  VP                  P	                  4       4       V P                  VP                  P	                  RR7      4       VP                  R4       V P                  VP                  P	                  4       4       V P                  VP                  P	                  RR7      4       R# r  )r   r  r{  r  ry  rN  r   s   &  r   test_info_is_file_caching"PathTest.test_info_is_file_caching	  s    HHTYYL)*>?	W)*>?r   c                   V P                  V P                  4      pVR ,          pV P                  VP                  P	                  4       4       VP                  R4       V P                  VP                  P	                  4       4       VR ,          pV P                  VP                  P	                  4       4       VP                  4        V P                  VP                  P	                  4       4       R# )mylinkblahN)r   r  r{  r  r  r  r}  r,  r   s   &  r   test_info_is_symlink_caching%PathTest.test_info_is_symlink_caching	  s    HHTYYL**,-	V**,-L))+,	
))+,r   c                x   V P                  V P                  4      P                  R 4      P                  4       pV P                  V P                  4      P                  RR4      P                  4       pV P                  V P                  4      P                  R4      P                  4       pV P	                  VP
                  \        4       V P                  VP
                  VP
                  4       V P                  VP
                  VP
                  4       V P                  VP
                  VP
                  4       V P	                  VP                  \        4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P	                  VP                  \        4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       R# )r  r  r  r  N)r   r  r   r  r9   r  r  ri   r   st_inost_dev)r   statAstatBstatCs   &   r   	test_statPathTest.test_stat
  sr   #,,W5::<#,,VW=BBD#,,V499;emmS16EMM5==9EMM5==9ellC0ELL%,,7ELL%,,7ELL%,,7ellC0u||4u||4r   c                    V P                  V P                  4      R ,          pVP                  4       pV P                  W!P                  RR7      4       R# )r  Fr  N)r   r  r  ri   r   r[   r  s   &  r   &test_stat_no_follow_symlinks_nosymlink/PathTest.test_stat_no_follow_symlinks_nosymlink
  s=    HHTYY')VVXVVEV:;r   c                    V P                  V P                  4      R ,          pVP                  4       pV P                  W!P                  RR7      4       R# )r  Fr  N)r   r  r  r   r  s   &  r   test_stat_no_follow_symlinks%PathTest.test_stat_no_follow_symlinks$
  s=    HHTYY')VVXBu =>r   c                    V P                  V P                  4      R ,          pVP                  4       pV P                  W!P	                  4       4       R# r  )r   r  r  r   r  r  s   &  r   
test_lstatPathTest.test_lstat*
  s8    HHTYY(VVXB	*r   c                    V P                  V P                  4      R ,          pVP                  4       pV P                  W!P	                  4       4       R# rs  )r   r  r  ri   r  r  s   &  r   test_lstat_nosymlinkPathTest.test_lstat_nosymlink0
  s8    HHTYY')VVXWWY'r   c                   V P                   pV! V P                  4      pV P                  R VP                  4       4       V P                  R VR,          P                  4       4       V P                  R VR,          P                  4       4       V P                  RVR,          R,          P                  4       4       V P                  '       d   V P                  R VR,          P                  4       4       V P                  R VR,          P                  4       4       V P                  R VR,          R,          P                  4       4       V P                  RVR,          R,          P                  4       4       V P                  RVR,          P                  4       4       V P                  R VR,          P                  RR	7      4       V P                  RVR
,          P                  4       4       V P                  RV! R4      P                  4       4       V P                  RV! V P                  R,           4      P                  4       4       V P                  RV! V P                  R,           4      P                  4       4       R# )Tr  r  Fbahr  r!  r  r   r  r  z/xyzzy    N)r   r  rk   r  r'  r   s   &  r   test_existsPathTest.test_exists5
  s   HHdiiLdAHHJ'dQZ//12dQ[0023ea'kE199;<MM$W 4 4 67MM$W 4 4 67MM$Ww!6 > > @AMM%!g+"5!=!=!?@MM%!l"2!:!:!<=MM$\!1 9 9% 9 PQea%i//12eQx[//12eQtyy834;;=>eQtyy61299;<r   c                   V P                  V P                  4      pV P                  VR ,          P                  4       4       V P	                  VR,          P                  4       4       V P	                  VR,          P                  4       4       V P	                  VR,          R,          P                  4       4       V P
                  '       ds   V P	                  VR,          P                  4       4       V P                  VR,          P                  4       4       V P	                  VR,          P                  4       4       V P	                  VR,          P                  4       4       V P	                  VR,          P                  4       4       R	# )
r  r  r  r  r  r!  r      dirAdirA Nr   r  r}  rx  r{  r'  r   s   & r   test_is_dirPathTest.test_is_dirH
  s   HHTYYV++-.!g+--/0!n,4467!g+-5578a'k1134OOQ[0023ao5578!l*2245!j.0023r   c                >   V P                  V P                  4      pV P                  VR ,          P                  RR7      4       V P	                  VR,          P                  RR7      4       V P	                  VR,          P                  RR7      4       V P	                  VR,          R,          P                  RR7      4       V P
                  '       dy   V P	                  VR,          P                  RR7      4       V P	                  VR,          P                  RR7      4       V P	                  VR,          P                  RR7      4       V P	                  VR	,          P                  RR7      4       V P	                  VR
,          P                  RR7      4       R# )r  Fr  r  r  r  r  r!  r   r  r  Nr  r   s   & r   test_is_dir_no_follow_symlinks'PathTest.test_is_dir_no_follow_symlinksU
  sE   HHTYYV++E+BC!g+--e-DE!n,44U4KL!g+-55e5LMa'k11%1HIa'k11%1HIao55e5LM!l*2252IJ!j.000GHr   c                   V P                  V P                  4      pV P                  VR ,          P                  4       4       V P	                  VR,          P                  4       4       V P	                  VR,          P                  4       4       V P	                  VR ,          R,          P                  4       4       V P
                  '       ds   V P                  VR,          P                  4       4       V P	                  VR,          P                  4       4       V P	                  VR,          P                  4       4       V P	                  VR,          P                  4       4       V P	                  VR,          P                  4       4       R	# )
r  r  r  r  r  r!  r      fileAfileA Nr   r  r}  ry  r{  r'  r   s   & r   test_is_filePathTest.test_is_fileb
  s   HHTYYW--/0!f*--/0!n,5578!g+-6689OOQ[1134a'k2245ao6689!m+4467!k/2245r   c                >   V P                  V P                  4      pV P                  VR ,          P                  RR7      4       V P	                  VR,          P                  RR7      4       V P	                  VR,          P                  RR7      4       V P	                  VR ,          R,          P                  RR7      4       V P
                  '       dy   V P	                  VR,          P                  RR7      4       V P	                  VR,          P                  RR7      4       V P	                  VR,          P                  RR7      4       V P	                  VR	,          P                  RR7      4       V P	                  VR
,          P                  RR7      4       R# )r  Fr  r  r  r  r  r!  r   r  r  Nr  r   s   & r   test_is_file_no_follow_symlinks(PathTest.test_is_file_no_follow_symlinkso
  sE   HHTYYW--e-DE!f*--e-DE!n,55e5LM!g+-66u6MNa'k2252IJa'k2252IJao66u6MN!m+44U4KL!k/2252IJr   c                   V P                  V P                  4      pV P                  VR ,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR ,          R,          P                  4       4       V P                  '       ds   V P                  VR,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR,          P                  4       R4       V P                  VR	,          P                  4       R4       V P                  '       dQ   V P                  VR
,          P                  4       R4       V P                  VR,          P                  4       R4       R# R# )r  r  r  r  r  r!  r   r  Fr  u   linkAzlinkA N)r   r  r{  r  r'  r}  rk   ry  r   s   & r   test_is_symlinkPathTest.test_is_symlink|
  s\   HHTYY!g+1134!f*0023!n,88:;!g+-99;<OOQ[4467OOQ[4467OOQ_88:;q=(113U;q;//159MM1},557?MM1{?335u= r   c                   V P                  V P                  4      pV P                  VR ,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR ,          R,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR,          P                  4       4       R# )r  r  r  r  r  r  N)r   r  r{  is_junctionr   s   & r   test_is_junction_falsePathTest.test_is_junction_false
  s    HHTYY!g+2245!f*1134!n,99;<!g+-::<=!m+88:;!k/6689r   c                   V P                  V P                  4      p\        P                  P	                  VP
                  R 4      ;_uu_ 4        V P                  VP                  4       VP
                  P                  P                  4       VP
                  P                  P                  V4       RRR4       R#   + '       g   i     R# ; i)
isjunctionN)r   r  r   rk  objectrU   ri   r)  r-  rl  assert_called_once_withr   s   & r   test_is_junction_truePathTest.test_is_junction_true
  s|    HHTYYZZqxx66Q]]_ahh.A.A.N.NOHH77: 7666s   A$B<<C	c                   V P                  V P                  4      pV P                  VR ,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR ,          R,          P                  4       4       V P	                  VR,          P                  4       R4       V P	                  VR,          P                  4       R4       R# r  r  r  r  r  Fr  N)r   r  r{  is_fifork   r   s   & r   test_is_fifo_falsePathTest.test_is_fifo_false
  s    HHTYY!g+..01!f*--/0!n,5578!g+-6689q=(113U;q;//159r   zos.mkfifo() requiredc                   V P                  V P                  R 4      p \        P                  ! \	        V4      4       V P                  VP                  4       4       V P                  VP                  4       4       V P                  VP                  4       4       V P                  V P                  V P                  R4      P                  4       R4       V P                  V P                  V P                  R4      P                  4       R4       R#   \
         d#   pT P                  RT,          4        Rp?LRp?ii ; i)myfifozos.mkfifo(): %sNu	   myfifoFzmyfifo )r   r  r   rj  rh   r2  rW   r}  r4  r{  	is_socketry  rk   )r   rn   es   &  r   test_is_fifo_truePathTest.test_is_fifo_true
  s     HHTYY)	1IIc!f 			$'%dhhtyy.9AACUKdhhtyy,7??A5I  	1MM+a/00	1s   D D=D88D=c                   V P                  V P                  4      pV P                  VR ,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR ,          R,          P                  4       4       V P	                  VR,          P                  4       R4       V P	                  VR,          P                  4       R4       R# r3  )r   r  r{  r9  rk   r   s   & r   test_is_socket_falsePathTest.test_is_socket_false
  s    HHTYY!g+0023!f*//12!n,779:!g+-88:;q=(335u=q;113U;r   AF_UNIXzUnix sockets requiredz/Unix sockets are not implemented on Emscripten.zCannot create socket on WASI.c                r   V P                  V P                  R 4      p\        P                  ! \        P                  \        P                  4      pV P                  VP                  4        VP                  \        V4      4       V P                  VP                  4       4       V P                  VP!                  4       4       V P                  VP#                  4       4       V P%                  V P                  V P                  R4      P                  4       R4       V P%                  V P                  V P                  R4      P                  4       R4       R#   \         dS   p\        T\        4      '       g   R\        T4      9   d"   T P                  R\        T4      ,           4        Rp?EL+Rp?ii ; i)mysockzAF_UNIX path too longzcannot bind Unix socket: Nu	   mysockFzmysock )r   r  socketr@  SOCK_STREAMrL  closebindrh   r   r-  r2  rW   r}  r9  r{  r4  ry  rk   )r   rn   sockr:  s   &   r   test_is_socket_truePathTest.test_is_socket_true
  s$    HHTYY)}}V^^V-?-?@

#	DIIc!f
 	&%%dhhtyy.9CCEuMdhhtyy,7AACUK  	D1o..+s1v59CFBC	Ds   ,E F6$AF11F6c                   V P                  V P                  4      pV P                  VR ,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR ,          R,          P                  4       4       V P	                  VR,          P                  4       R4       V P	                  VR,          P                  4       R4       R# r3  )r   r  r{  is_block_devicerk   r   s   & r   test_is_block_device_false#PathTest.test_is_block_device_false
  s    HHTYY!g+6689!f*5578!n,==?@!g+->>@Aq=(99;UCq;7795Ar   c                   V P                  V P                  4      pV P                  VR ,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR ,          R,          P                  4       4       V P	                  VR,          P                  4       R4       V P	                  VR,          P                  4       R4       R# r3  )r   r  r{  is_char_devicerk   r   s   & r   test_is_char_device_false"PathTest.test_is_char_device_false
  s    HHTYY!g+5578!f*4467!n,<<>?!g+-==?@q=(88:EBq;668%@r   c                L   V P                  \        P                  4      pVP                  4       '       g   V P	                  R 4       V P                  VP                  4       4       V P                  VP                  4       4       V P                  VP                  4       4       V P                  V P                  \        P                   R24      P                  4       R4       V P                  V P                  \        P                   R24      P                  4       R4       R# )znull device requiredr  Fr  N)r   r   devnullr  rW   r}  rO  r{  rK  ry  rk   r   s   & r   test_is_char_device_true!PathTest.test_is_char_device_true
  s    HHRZZ xxzzMM01((*+**,-%dhh"**V45DDFNdhh"**T23BBDeLr   c                   V P                  V P                  4      pV P                  VR ,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR,          P                  4       4       V P                  VR ,          R,          P                  4       4       V P                  '       d'   V P                  VR,          P                  4       4       \
        P                  R8X  d   V P                  R4      pMV P                  R4      pV P                  VP                  4       4       V P                  VR,          P                  4       4       R	# )
r  r  r  r  r  r   rz   r   r  N)r   r  r{  is_mountr'  r   rZ   r}  )r   rn   Rs   &  r   test_is_mountPathTest.test_is_mount
  s    HHTYY!g+//12!f*..01!n,6689!g+-779:a'k335677d? AA

%!h,0023r   c                   V P                   pVP                  V P                  R 4      pVP                  V P                  RR4      pV P                  V4      pV P                  V4      pV P                  V4      pV P	                  VP                  V4      4       V P	                  VP                  V4      4       V P                  VP                  V4      4       V P                  VP                  V4      4       VP                  V P                  R4      pV P                  V4      pV P                  \        VP
                  V4       V P                  \        VP
                  V4       V P                  \        VP
                  V4       V P                  \        VP
                  V4       V P                  \        VP
                  V4       V P                  \        VP
                  V4       R# )r  r  r  r  N)	rU   r*  r  r   r}  r|  r{  r   r7  )	r   rU   
fileA_path
fileB_pathr[   r   r   non_existentr   s	   &        r   test_samefilePathTest.test_samefile   sa   [[G4
[[FG<
HHZ XXj!HHZ 

:./

2'J/0A'{{499e4HH\"+QZZ;+QZZF+QZZ;+QZZF+QZZ;+QZZFr   c                    V P                  \        4      ;_uu_ 4        V P                  R R7       RRR4       R#   + '       g   i     R# ; i)r  )r  N)r   r   r   r:   s   &r   test_passing_kwargs_errors#PathTest.test_passing_kwargs_errors  s0    y))HHH *)))s	   ;A	c                    V P                   pV! V P                  R 4      p\        VP                  4       4      pR Uu0 uF  qA! V P                  R V4      kK  	  ppV P	                  W54       R# u upi )r!  N)r  r%  )r   r  r  r  ri   )r   rn   r[   pathsr   r   s   &     r   test_iterdir_symlinkPathTest.test_iterdir_symlink  sd     HHdii!AIIK 7IK7I!Qtyy'1-7IK) Ls   A.c                h   V P                   pV! V P                  4      pVR ,          p\        VP                  R 4      4      pVP                  P                  4       '       d   V0M	\        4       pV P                  WE4       V P                  \        VP                  R4      4      \        4       4       R# )FILEazFILEa*N)r   r  r  r  r  r  ri   r   rn   r[   r   givenexpects   &     r   test_glob_posixPathTest.test_glob_posix"  sz    HHdiiLKAFF7O$!SU'QVVH-.6r   c                   V P                   pV! V P                  4      pV P                  \        VP	                  R 4      4      V! V P                  R4      04       V P                  \        VP	                  R4      4      V! V P                  R4      04       V P                  \        VP	                  R4      4      V! V P                  R4      04       R# )ri  r  z*a\dirA/zF*aN)r   r  ri   r  r  r   s   &  r   test_glob_windowsPathTest.test_glob_windows,  s    HHdiiLQVVG_-499g1F/HIQVVF^,$))W0E.GHQVVE]+qG/D-FGr   c                "   V P                  R 4      pV P                  \        R4      ;_uu_ 4        \        VP	                  R 4      4       RRR4       V P                  \        R4      ;_uu_ 4        \        VP	                  R4      4       RRR4       V P                  \        R4      ;_uu_ 4        \        VP	                  R4      4       RRR4       R#   + '       g   i     L; i  + '       g   i     Lf; i  + '       g   i     R# ; i)rs   zUnacceptable patternNrP   z./)r   r  r5  r  r  r   s   & r   test_glob_empty_pattern PathTest.test_glob_empty_pattern4  s    HHRL##J0FGG H##J0FGG H##J0FGG HG	 HGGGGGGs#   C1C*2C=C'	*C:	=D	c                |   ^pV P                   pV! V P                  4      R,          ;r4VP                  4        \        V4       F  pVR,          pVP                  4        K  	  RP	                  R.V,          4      p\        ^d4       Uu. uF  qtP                  V4      NK  	  ppV F  p	V P                  \        V	4      V4       K   	  \        ^d4       Uu. uF  qtP                  R4      NK  	  ppTp\        V4       F0  p
VR,          pV F  p	V P                  \        V	4      V4       K   	  K2  	  R# u upi u upi )   deepr   r   r  N)	r   r  r)  r   r*  r  ri   nextr  )r   depthrn   r[   r  rP  r  jitersitis   &          r   test_glob_many_open_files"PathTest.test_glob_many_open_files=  s   HHTYY<&((		uAHAGGI  ((C55=)-23Z8Z7#Z8BT"Xq) */*5*QC*5uACA  b1-   9 6s   
D4D9c                <   ^2pV^
,           pV P                  V P                  R4      pVP                  ! R.V,          !  pVP                  RR7       \	        V4      ;_uu_ 4        \        VP                  R4      4       RRR4       R#   + '       g   i     R# ; i)2   rx  r   Tr  **/N)r   r  r   r)  r
   r  r  r   recursion_limitdirectory_depthr  r   s   &    r   test_glob_above_recursion_limit(PathTest.test_glob_above_recursion_limitP  ss    )B.xx		6*}}u68

4
 005!" 1000s   %B

B	c           
     0   V P                   pV! V P                  4      pR pVR,          VR,          0pV P                  V\        VP	                  V! V4      4      4      4       V P                  V\        VP	                  \        V4      4      4      4       R# )
dir*/file*
dirB/fileB
dirC/fileCN)r   r  ri   r  r  r   r   rn   r[   r  rl  s   &    r   test_glob_pathlikePathTest.test_glob_pathlike[  sv    HHdiiLl"A$45QVVAgJ%7!89QVVHW,=%>!?@r   c                   a a S P                   oVV 3R  lpS! S P                  4      pV! VRR. 4       V! VRRR.4       V! VRR. 4       V! VRRR.4       R# )c           	         < V P                  WR 7       Uu0 uF  p\        V4      kK  	  ppV Uu0 uF  p\        S! SP                  V4      4      kK!  	  ppSP                  WS4       R# u upi u upi )ru  N)r  rh   r  ri   )r   r  rv  r   r   r   rn   r   s   &&&&  r   _check1PathTest.test_glob_case_sensitive.<locals>._checke  sb    &*iii&WX&Wc!f&WFX6>?hAdiiO,hH?V. Y?s
   A*%A/z
DIRB/FILE*TFr  z
dirb/file*Nr   r  )r   r  r   rn   s   f  @r   test_glob_case_sensitive!PathTest.test_glob_case_sensitivec  s\    HH	/ |t\4,t\5<.9t\4,t\5<.9r   c                   V P                   p\        P                  ! V! V P                  R 4      4      ;_uu_ 4        V P	                  \        V! R4      P                  R4      4      V! R4      V! R4      V! R4      04       V P	                  \        V! R4      P                  R4      4      V! R4      V! R4      V! R4      V! R4      V! R4      04       V P	                  \        V! R4      P                  R4      4      V! R4      V! R4      V! R4      V! R4      04       V P	                  \        V! R4      P                  R	4      4      V! R4      04       R
R
R
4       R
#   + '       g   i     R
# ; i)r  rP   r  r  r  r  r  r6  r  z**/*/*N)r   r   
change_cwdr  ri   r  r  r   s   & r   test_glob_dotPathTest.test_glob_doto  s(   HH!!!DIIv"677AcFKK$%'
AkNAfI'NPAcFKK%&7Q{^QvYPQR^P_abcfag(hjAcFKK'(1W:q~qyRST`Ra*bdAcFKK)*Q|_,=? 8777s   DE""E3	z1WASI resolution of '..' parts doesn't match POSIXc           
        V P                   pV! V P                  4      pV P                  \        VP	                  R 4      4      V! V P                  R 4      04       V P                  \        VP	                  R4      4      V! V P                  R R 4      04       V P                  \        VP	                  R4      4      V! V P                  RR 4      04       V P                  \        VP	                  R4      4      V! V P                  R4      04       V P                  \        VP	                  R4      4      \        4       4       V P                  \        VP	                  R4      4      \        4       4       V P                   P
                  \        J d4   V P                  \        VP	                  R4      4      \        4       4       M=V P                  \        VP	                  R4      4      V! V P                  R	R 4      04       \        P                  R
8X  d   ^0pM^2pV P                  \        VP	                  RP                  R .V,          4      4      4      V! V P                  .R .V,          O5!  04       R# )r  z../..dirA/..r  zdirA/../file*zdirA/../fileAzdirA/../file*/..z../xyzzyzxyzzy/..xyzzy
emscriptenr   N)
r   r  ri   r  r  rU   rV   sysplatformr*  )r   rn   r[   NDOTDOTSs   &   r   test_glob_dotdotPathTest.test_glob_dotdot}  s    HHdiiLQVVD\*a		4.@,BCQVVG_-499dD1I/KLQVVI./1TYY3M1OPQVVO45499o9V7XYQVV$678#%@QVVJ/0#%888??i'S
!34ce< S
!34$))Wd8S6UV<<<' HHQVVCHHdVh->$?@AQtyyEeTXSY\dSdEeCfgr   c                   V P                   pV! V P                  R R4      pVP                  RR7       VP                  P	                  ^ 4       V P                  \        VP                  R4      4      \        4       4       R# )mydir1mydir2Tr  r  N)r   r  r)  r  r-  ri   r  r  r   s   &  r   test_glob_inaccessiblePathTest.test_glob_inaccessible  sZ    HHdii8,		qQVVC[)351r   c           
     2   V P                   pV! V P                  R 4      pRpVR,          VR,          0pV P                  V\        VP	                  V! V4      4      4      4       V P                  V\        VP	                  \        V4      4      4      4       R# )r  **/file*r  r6  N)r   r  ri   r  r  r   r  s   &    r   test_rglob_pathlikePathTest.test_rglob_pathlike  sx    HHdii g+q</0QWWQwZ%8!9:QWWXg->%?!@Ar   c                  a a VV 3R  lpS P                   oS! S P                  4      pV! VR. 4       V! VRRR.4       V! VR. RO4       V! VR. RO4       V! VRRR.4       V! VR	. RO4       V! VR
. RO4       V! VR. RO4       V! VR. RO4       V! VR. RO4       V! VR. R O4       V! VR. R!O4       V! VR. R"O4       V! VRR.4       V! VRR.4       V! VRRR.4       V! VRR.4       R# )#c           
        < V P                  VR R7       U u0 uF'  p V P                  P                  R4      ^8:  g   K%  V kK)  	  pp SP                  Y2 Uu0 uF  pS! SP                  V4      kK  	  up4       R# u up i u upi Trecurse_symlinksr%  N)r  rj   countri   r  r   r  r   r   r   rn   r   s   &&&  r   r  :PathTest.test_glob_recurse_symlinks_common.<locals>._check  sw    '+yyy'M 9'Mt))'2a7 d'MF 9V%J1qA%JK9%J   "A:A:A?
r  r  r  r  z*Az*B/*linkB/fileB*/fileB*/z	dir*/*/..dir*/**dirC/dirD/fileDdir*/**/
dirC/dirD/z
dir*/**/..z	dir*/*/**z
dir*/*/**/zdir*/*/**/..zdir*/**/fileCzdir*/*/../dirD/**/zdirC/dirD/../dirD/z	*/dirD/**z
*/dirD/**/N)r  r  r  )r  
dirB/linkDr  zlinkB/linkD)rp  dirB/dirC/dirE/linkB/)dirC/dirD/..dirA/linkC/..dirB/linkD/..)rp  
dirA/linkCdirA/linkC/fileBdirA/linkC/linkDdirA/linkC/linkD/fileBr  r  r  dirB/linkD/fileBr  r  	dirC/dirDr  dirC/novel.txtr  )rp  dirA/linkC/dirA/linkC/linkD/r  dirB/linkD/r  r  r  )r  r  zdirB/..r  dirA/linkC/linkD/..zdirC/..r  zdirE/..)r  r  r  r  r  r  r  r  )r  r  r  r  )r  r  r  r  r  r   r  r[   rn   s   f  @r   !test_glob_recurse_symlinks_common*PathTest.test_glob_recurse_symlinks_common  s/   	L HHdiiLq'2q,| <=q$23q&TUq)lM:;q$FGq+QRq)  	
 	q* ? 	@q, !G 	H 	q+  - 	. 	q, abq. #D 	Eq/L>2q&)=(>?q+.?@Aq,/r   c                  a a VV 3R  lpS P                   oS! S P                  4      pV! VR. RO4       V! VR. 4       V! VR. RO4       V! VR. RO4       V! VR. RO4       V! VR
. RO4       S! S P                  R4      pV! VR. RO4       V! VRRR.4       V! VRR.4       V! VRR	.4       V! VR
RR	.4       V! VRR.4       V! VRR.4       R# )c           
        < V P                  VR R7       U u0 uF'  p V P                  P                  R4      ^8:  g   K%  V kK)  	  pp SP                  Y2 Uu0 uF  pS! SP                  V4      kK  	  up4       R# u up i u upi r  )r  rj   r  ri   r  r  s   &&&  r   r  ;PathTest.test_rglob_recurse_symlinks_common.<locals>._check  sw    '+zz$z'N 9'Nt))'2a7 d'NF 9V%J1qA%JK9%Jr  r  */fileAr  file*r  r  r  r  r  rs   r  r  r  */**.txt*.*N)r  r  r  r  r  linkB/linkD/fileB)	r  r  r  r  r  r  r  r  r  )
rp  r  r  r  r  r  r  r  r  linkB/linkD/)rs   rp  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  s   f  @r   "test_rglob_recurse_symlinks_common+PathTest.test_rglob_recurse_symlinks_common  s   	L HHdiiLq' _ 	`q)R q) a 	bq' L 	M 	q$ S 	Tq" Q 	R dii q# 8 	9q'L*;<=q%+,-q$'q"w-.q',-.q%*+,r   c                  a a VV 3R  lpS P                   oS! S P                  4      pVP                  R4      pS P                  V\        P
                  P                  4       V! VRR.4       V! VRR.4       V! VRR.4       V! VR. 4       S P                  '       d   V! VR. RO4       V! VR. RO4       MV! VRR.4       V! VR. RO4       V! VR
. RO4       V! VR. RO4       S! S P                  R4      pV! VR. RO4       V! VR
RR.4       V! VRRR.4       V! VRR	R.4       V! VRR	.4       V! VRR.4       V! VRR	.4       V! VRRR	.4       V! VR. R O4       V! VRRR	.4       V! VRR.4       V! VRR.4       R# )!c           
         < \        V P                  VR R7      4      pSP                  Y2 Uu0 uF  pS! SP                  V4      kK  	  up4       R# u upi )Fr  N)r  r  ri   r  r  s   &&&  r   r  :PathTest.test_rglob_recurse_symlinks_false.<locals>._check  sF    D5ABFV%J1qA%JK%Js   A
r  r  r  z**/fileBr  r  r  r  r  r  r  r  rs   r  r  r  r  r  r  r  r  r  r  r  N)r  r  r  r  )rp  r  r  r  r  r  r  r  )rp  r  r  r  r  )r  r  r  r  )rs   rp  r  r  r  r  r  )r  r  r  r  r  )r   r  r  r9   collectionsr(  Iteratorr'  )r   r  r[   r}  rn   s   f   @r   !test_rglob_recurse_symlinks_false*PathTest.test_rglob_recurse_symlinks_false  s   	L HHdiiLWWWb+//":":;q'G9%q'L>*q*|n-q)R 1i "E F1d 1 2 1i,01dNOq'STq"LMdii q# > 	?q'L*;<=q*|->?@q)l,=>?q*|n-q%+,-q$'q"w-.q$abq%'<01q',-.q%*+,r   c                d   V P                   pV! V P                  R 4      pVR,          R,          p\        VP                  R4      4      pVP	                  4       '       d   V0M	\        4       pV P                  WE4       V P                  \        VP                  R4      4      \        4       4       R# )r  r  FILEdzFILEd*N)r   r  r  r  r  ri   rj  s   &     r   test_rglob_posixPathTest.test_rglob_posix  s    HHdii J AGGG$%

!'QWWX./7r   c                4   V P                   pV! V P                  R 4      pV P                  \        VP	                  R4      4      V! V P                  R4      04       V P                  \        VP	                  R4      4      V! V P                  R4      04       R# )r  r  r  z*\r  N)r   r  ri   r  r  r   s   &  r   test_rglob_windowsPathTest.test_rglob_windows  ss    HHdii QWWW-.!DII?P2Q0STQWWU^,$))\0J.LMr   c                    V P                   pV! V P                  4      p\        VP                  R RR7      4      p0 RmpT P	                  Y4 Uu0 uF  qRV,          kK  	  up4       R# u upi )r  Fr  N>   r  r  r  r  r  r  r!  r   r&  r  r  r  r  r  r  r  )r   r  r  r  ri   )r   rn   r[   rk  rl  re   s   &     r   test_rglob_symlink_loop PathTest.test_rglob_symlink_loop#  s`     HHdiiLAGGC%G89
 	 71Q 78 7s   A(
c           	        V P                   pV! V P                  4      R ,          pVP                  4        \        ^d4       Fg  pVRV 2,          pV^,          '       d&   VP	                  V! V P                  RR4      4       KC  VP	                  V! V P                  R4      RR7       Ki  	  V P                  \        \        VP                  R4      4      4      ^d4       V P                  \        \        VP                  R4      4      4      ^24       V P                  \        \        VP                  R	4      4      4      ^24       V P                  \        \        VP                  R
4      4      4      ^24       R# )permissionsr  r  r  r  Tr"  r  r  z*/fileCz*/file*N)	r   r  r)  r   r  ri   r   r  r  )r   rn   r  r~  r  s   &    r   test_glob_permissionsPathTest.test_glob_permissions6  s    HH|m+

sAD*$D1uu$))V] CD$))V 4$O  	S30137S412B7S9!567<S9!567<r   c                    V P                  V P                  4      R ,          pVP                  4        VR,          pVP                  R4       V P	                  \        VP                  R4      4      V.4       R# )long_symlinkbad_linkr  NX  badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbad)r   r  r)  r  ri   sortedr  )r   r  r  s   &  r   test_glob_long_symlinkPathTest.test_glob_long_symlinkI  s\     xx		"^3

*$K(		& 12XJ?r   c                R   V P                   pV P                  \        V! R 4      P                  4       4      R 4       V P                  \        V! R4      P                  4       4      R4       V P                  \        V! R4      P                  4       4      R4       V P                  \        V! R4      P                  4       4      R4       V P                  \        V! R4      P                  4       4      R4       V P                  \        V! R4      P                  4       4      R4       R# )r   r)  r   rN  r  r   N)r   ri   rh   rm  r   s   & r   test_absolute_posixPathTest.test_absolute_posixR  s    HHQsV__./5QtW--/0$7QvY//12F; 	QtW--/0$7QuX..0159QwZ0023W=r   z,umask is not implemented on Emscripten/WASI.c                r   \         P                  ! ^4      pV P                  \         P                  V4       V P                  V P                  4      pVR,          P                  R4      ;_uu_ 4         RRR4       \         P                  ! V P                  P                  V P                  R4      4      pV P                  \        P                  ! VP                  4      R4       \         P                  ! ^4       VR,          P                  R4      ;_uu_ 4         RRR4       \         P                  ! V P                  P                  V P                  R4      4      pV P                  \        P                  ! VP                  4      R4       R#   + '       g   i     EL'; i  + '       g   i     L; i)r
  new_filer  N  other_new_file  )r   umaskrL  r   r  r+  r  rU   r*  ri   r  r  r   old_maskr[   r  s   &   r   test_open_modePathTest.test_open_mode^  s    88E?(+HHTYY*n""4(( )WWT[[%%dii<=bjj159
""((.. /WWT[[%%dii1ABCbjj159 )((
 /.s   2FF&F#	&F6	c                4   \         P                  ! 4       p \         P                  ! R 4       V P                  R4      pV P	                  \        VP                  4       4      R4       \         P                  ! V4       R#   \         P                  ! T4       i ; i)r   r  z/spamN)r   rK  r  r   ri   rh   r  )r   current_directoryr[   s   &  r   test_resolve_rootPathTest.test_resolve_roots  sb    IIK	(HHSM AS-w7HH&'BHH&'s   AA? ?Bc                   \         P                  ! ^4      pV P                  \         P                  V4       V P                  V P                  4      pVR,          P                  4        \         P                  ! V P                  P                  V P                  R4      4      pV P                  \        P                  ! VP                  4      R4       \         P                  ! ^4       VR,          P                  4        \         P                  ! V P                  P                  V P                  R4      4      pV P                  \        P                  ! VP                  4      R4       VR,          P                  RR7       \         P                  ! V P                  P                  V P                  R4      4      pV P                  \        P                  ! VP                  4      R4       R# )	r
  r   r  r  r  masked_new_filei  )r  N)r   r  rL  r   r  r  r  rU   r*  ri   r  r  r  s   &   r   test_touch_modePathTest.test_touch_mode}  s;    88E?(+HHTYY	
Z WWT[[%%dii<=bjj159
	
	$$&WWT[[%%dii1ABCbjj159	
	%%5%1WWT[[%%dii1BCDbjj159r   r  z%pwd module does not expose getpwall()zno home directory on VxWorksc                `   V P                   p\        P                  ! R 4       ^ RIpVP                  ! \
        P                  ! 4       4      pVP                  pVP                  P                  R4      ;'       g    RpVP                  ! 4        F<  pVP                  pVP                  P                  R4      pWd8w  g   K2  V'       g   K<   M	  TpTpRp VP                  ! V4      '       d   VR,          pK#   V! R4      p	V! RV R24      p
V! RV R24      pV! RV R24      pV! R	V R24      pV! R
4      pV! RV R24      p\        P                  ! 4       ;_uu_ 4       pVP                  R4       V P!                  V	P#                  4       V! V4      R,          4       V P!                  V
P#                  4       V! V4      R,          4       V P!                  VP#                  4       V! V4      R,          4       V P!                  VP#                  4       V4       V P!                  VP#                  4       V4       V P!                  VP#                  4       V4       V P%                  \&        VP"                  4       RVR&   V P!                  V	P#                  4       V! R4      4       V P!                  V
P#                  4       V! V4      R,          4       V P!                  VP#                  4       V! V4      R,          4       V P!                  VP#                  4       V4       V P!                  VP#                  4       V4       V P!                  VP#                  4       V4       V P%                  \&        VP"                  4       RRR4       R#   \         d     ELi ; i  + '       g   i     R# ; i)r  Nr   fakeuserr  z~/Documentsrq  z
/Documentsr  r  rs   rz  	Documentsz/tmpz/tmp/Documents)r   r   import_moduler  r  r   getuidr  pw_dirrstripr  getpwnamr  r   r{  unsetri   rr  r   RuntimeError)r   rn   r  pwdentusernameuserhome	othername	otherhomefakenamer   r   p3p4p5p6p7r}  s   &                r   test_expanduser_posixPathTest.test_expanduser_posix  s    HH##E*biik*>>=='',33llnFI,,S1I$	 % !I I	,,x((C )
 }8*J'(9+Z()hZz*+H:Z()rU8*J'(**,,IIfR]]_akK.GHR]]_akK.GHR]]_a	l[.HIR]]_b1R]]_b1R]]_b1lBMM: CKR]]_a0@.ABR]]_akK.GHR]]_a	l[.HIR]]_b1R]]_b1R]]_b1lBMM:% -,  		 -,,s%   N
 -N
 "HN
NNN-	darwinz1Bad file descriptor in /dev/fd affects only macOSc                >    \        \        P                  ! R 4      P                  R4      4      R,          pV'       g   V P	                  R4       V F  pVP                  4        VP                  4        VP                  4        VP                  4        VP                  4        VP                  4        VP                  4        VP                  4        K  	  R#   \         d7   pTP                  \        P                  8X  d   T P!                  R4       h Rp?ii ; i)z/dev/fdr  :   NNz.no file descriptors - issue was not reproducedz Bad file descriptor not handled.N)r  r6   r.  r  rW   r  rx  ry  r  rK  rO  r4  r9  r   r   EBADFfail)r   file_descriptorsr/  r:  s   &   r   test_handling_bad_descriptor%PathTest.test_handling_bad_descriptor  s    	#GLL$;$A$A#$FGK#NO &

		!!#  "		 &  	ww%++%		<=	s   CC D&1DDc                v   V P                   pV P                  VP                  R 4      V! R4      4       V P                  \        VP                  R4       V P                  VP                  R4      V! R4      4       V P                  VP                  R4      V! R4      4       V P                  VP                  R4      V! R4      4       \
        '       g?   V P                  VP                  R\        P                  ! 4        R24      V! R4      4       V P                  \        VP                  R4       V P                  \        VP                  R4       V P                  \        VP                  R4       V P                  \        VP                  R	4       V P                  \        VP                  R
4       R# )zfile:/foo/bar/foo/barzfile://foo/barzfile:///foo/barzfile:////foo/bar	//foo/barzfile://localhost/foo/barzfile://foo/barfile:foo/barhttp://foo/barN)r   ri   from_urir   r5  r   rC  gethostnamer   s   & r   test_from_uri_posixPathTest.test_from_uri_posix  s@   HHO4a
mD*ajj2BC$56*F$67;H$>?:OwQZZ'&2D2D2F1Gx(PQz],*ajj)<*ajj*=*ajj+>*ajj.A*ajj2BCr   c           	         V P                   pV P                  VP                  \        R RR7      4      V! R 4      4       V P                  VP                  \        RRR7      4      V! R4      4       R# )r1  T)
add_schemer2  Nr   ri   r6  r   r   s   & r    test_from_uri_pathname2url_posix)PathTest.test_from_uri_pathname2url_posix  sY    HHL$MNPQR\P]^L$NOQRS^Q_`r   c                	   V P                   pV P                  \        V! R 4      P                  4       4      R 4       V P                  \        V! R4      P                  4       4      R4       V P                  \        V! R4      P                  4       4      R4       RpV P                  \        V! V4      P                  4       4      V4       V P                  \        V! VR,           4      P                  4       4      VR,           4       V P                  \        V! VR,           4      P                  4       4      VR,           4       \        P
                  ! R4      ;_uu_ 4       pW#n        V P                  \        V! 4       P                  4       4      V4       V P                  \        V! R4      P                  4       4      V4       V P                  \        V! R4      P                  4       4      \        P                  P                  VR4      4       V P                  \        V! RRR	4      P                  4       4      \        P                  P                  VRRR	4      4       R
R
R
4       \        P                  P                  V P                  4      ^ ,          p\        P                  ! V P                  4      ;_uu_ 4        V P                  \        V! R4      P                  4       4      VR,           4       V P                  \        V! R4      P                  4       4      VR,           4       V P                  \        V! V4      P                  4       4      V P                  4       V P                  \        V! VR,           4      P                  4       4      \        P                  P                  V P                  R4      4       R
R
R
4       \        P                  ! V P                  4      ;_uu_ 4       p\        P                  ! 4       pV R2p\        P                   ! V4       \        P                   ! V4       V P                  \        V! V4      P                  4       4      V4       V P                  \        V! VR,           4      P                  4       4      VR,           4       R
R
R
4       R
#   + '       g   i     ELZ; i  + '       g   i     EL
; i  + '       g   i     R
# ; i)rz   r{   r  z\\server\share\rQ   za\brj  rP   r   r   NrS  z\foor  z\dirA)r   ri   rh   rm  r   rk  rl  r   r   r*  
splitdriver  r   r  subst_driverK  r  )r   rn   sharerK  r>  other_drive	saved_cwd	other_cwds   &       r   test_absolute_windowsPathTest.test_absolute_windows  sg   HH 	QvY//12F;QwZ0023W=Qz]3356
C &QuX..0159Qus{^4467EQuv~.779:EFNK ZZ$$"'S0%8S3!23U;S3!23RWW\\%5MNS3S!1!:!:!<=WW\\%c3?A % ""499-a0!!$)),,S4!1!1!34edlCS7!4!4!67I S5!2!2!45tyyAS55=!1!:!:!<=rww||DIIW\?]^ - ""499--		I&-v.IHHYHHY S;!8!8!:;YGS;#6!7!@!@!BCYQXEXY .-' %$$ -,, .--s'   #DR6DS
9B3S6S	
S	S/	c                `  a aaaaaaaa	 S P                   o\        P                  ! 4       ;_uu_ 4       oSP                  R RRR4       RSR&   S! R4      oS! R4      oS! R4      oS! R	4      oS! R
4      oS! R4      o	S P	                  \
        SP                  4       S P	                  \
        SP                  4       S P	                  \
        SP                  4       S P                  SP                  4       S4       S P                  SP                  4       S4       S P                  S	P                  4       S	4       VVVVVVVV	V 3	R lpRSR&   V! 4        RSR&   RSR&   V! 4        SP                  RR4       RSR&   V! 4        RSR &   V! 4        RRR4       R#   + '       g   i     R# ; i)rz  rx  HOMEPATH	HOMEDRIVEaliceUSERNAMEz~/My Documentsz~alice/My Documentsz~bob/My Documentsz/~/My Documentszd:~/My Documentsrs   c                    <	 SP                  R R4       SP                  SP                  4       S ! R4      4       SP                  \        SP                  4       RSR &   SP                  SP                  4       S ! R4      4       SP                  SP                  4       S ! R4      4       SP                  SP                  4       S4       SP                  SP                  4       S4       SP                  SP                  4       S4       R# )rL  NzC:/Users/alice/My DocumentsrK  zC:/Users/bob/My Documents)r  ri   rr  r   r  )	rn   r}  r   r   r!  r"  r#  r$  r   s	   r   r   /PathTest.test_expanduser_windows.<locals>.check?  s    
D)  !"#@!AC!!,>")J  !"#@!AC  !"#>!?A  "5  "5  "5r   zC:\Users\alicezC:\zUsers\alicezC:\Users\eveN)r   r   r{  r  r   r  rr  ri   )
r   r   rn   r}  r   r   r!  r"  r#  r$  s
   f @@@@@@@@r   test_expanduser_windows PathTest.test_expanduser_windows*  sh   HH**,,IIfmZE%C
O #$B()B&'B$%B%&B2BlBMM:lBMM:lBMM:R]]_b1R]]_b1R]]_b16 6 1C
OG%C,C
OGIIk:.!3CG +CKG[ -,,,s   EFF-	c                &   V P                   pV P                  VP                  R 4      V! R4      4       V P                  VP                  R4      V! R4      4       V P                  VP                  R4      V! R4      4       V P                  VP                  R4      V! R4      4       V P                  VP                  R4      V! R4      4       V P                  VP                  R4      V! R4      4       V P                  VP                  R4      V! R4      4       V P                  VP                  R	4      V! R4      4       V P                  VP                  R
4      V! R4      4       V P                  \        VP                  R4       V P                  \        VP                  R4       V P                  \        VP                  R4       V P                  \        VP                  R4       V P                  \        VP                  R4       R# )zfile:c:/path/to/filec:/path/to/filezfile:c|/path/to/filezfile:/c|/path/to/filezfile:///c|/path/to/filezfile://server/path/to/file//server/path/to/filezfile:////server/path/to/filezfile://///server/path/to/filez file://localhost/c:/path/to/filez file://localhost/c|/path/to/filer3  z
c:/foo/barr2  r4  r5  N)r   ri   r6  r   r5  r   s   & r   test_from_uri_windowsPathTest.test_from_uri_windows\  s   HH$:;Q?P=QR$:;Q?P=QR$;<a@Q>RS$=>BS@TU$@A1E\C]^$BCQG^E_`$CDaH_F`a$FGK\I]^$FGK\I]^*ajj)<*ajj,?*ajj+>*ajj.A*ajj2BCr   c                    V P                   pV P                  VP                  R \        R4      ,           4      V! R4      4       V P                  VP                  R \        R4      ,           4      V! R4      4       R# )zfile:zc:\path\to\filerR  z\\server\path\to\filerS  Nr<  r   s   & r   "test_from_uri_pathname2url_windows+PathTest.test_from_uri_pathname2url_windowsr  sa    HHGl;M.N$NOQRSdQefGl;S.T$TUWXYpWqrr   c                    V P                   pV P                  \        P                  4      ;_uu_ 4        V! R 4      P	                  4        RRR4       R#   + '       g   i     R# ; irC  N)r   r   r6   r7   r  r   s   & r   test_owner_windowsPathTest.test_owner_windowsx  ?    HHw;;<<eHNN =<<<   AA&	c                    V P                   pV P                  \        P                  4      ;_uu_ 4        V! R 4      P	                  4        RRR4       R#   + '       g   i     R# ; irZ  )r   r   r6   r7   r  r   s   & r   test_group_windowsPathTest.test_group_windows~  r]  r^  r#   )T)r(   r=   r>   r?   r6   r.  r   r   r'  r\   r4  r=  rC  rM  rY  r   r`  rc  rg  rn  rs  unittestskipIfr  r~  r   r  r  r  r  r  r1   r  r  skip_unless_xattrr  r  r  r  r  r  r  r  r  r  r	  r  r  r,  r  r  root_in_posixr3  r<  rA  rI  rN  rR  rU  rY  r`  r$   rc  rg  rj  rm  rp  rt  rz  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r+   r  r  r  r  r   r  skip_unless_working_chmodr  r  r  
skipUnlessr  r  r  r  r   r)  r-  r2  r6  r:  r=  rC  rG  rO  skip_if_dac_overrider[  r.   ra  rh  ro  ru  skip_unless_hardlinkr~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r#  r&  r*  r0  r5  r;  r>  rC  r   rH  rL  rP  rT  rY  r_  rb  rf  rm  rq  rt  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	   r  r  r  r&  r.  r8  r=  rF  rO  rT  rW  r[  r`  r@   rA   r  r  s   @@r   r  r  h  sN    
,,C'')K%TN$;
=	B)F)_,) __tF
-
- __W:;N <N54BBE& F F F F   B !B A A ? ? 8 8
 O O O O ? ? O O * * W W W W W W  E E(%FN __S\\W,FF0FH}~__]$DE* F *I*   G !G 	= 	= 8 8
 	= 	= 8 8
 	= 	=	:  	: & &8 % %8
,   ) $ $)* ) ) &  & 0  0 %  % /  / *  *	:  D
 ) ) 0 0 * * E E(T&
 9GF59V 9Vv A A: 5  5, % % __WR,.HI J ((
5 )
5 ((5 ) 5N FG3 H3 FG(CDK E HK$O FG3 H3 FG(CDK E HK$*"
*+F$? 	= 	= ( (, __S\\"%1IK##((5 ) $K5. ( (. & & X.0FG__S\\Y.<>
%> H
%"( ##( $(" __WR(*@A B("("<0B	;F2
<<"C
 7 7
;
;(< . .. __WR+-FG H??@ 
- 
-5(<
 ? ?
 + +
(
=&4I6K> :;: X.0FG__S\\Y.;=
J= H
J< 35LM__H __0L NL BA	M4G*  * * 7 7 H H.&	#A
: 
? 
? __WQRh Sh.2B "0 "0H - ->'-R 8 8 N N 9 9$ = =$ @ @ 	> 	> __6 : 	
:  ( ( __6 : 	
:" j1@B__S\\Y.353; 5B
3;j __S\\X-HJ J* D D  a a
 +Z +ZZ / /b D D* s s
  
   r   r  c                      a  ] tR tRt o ]P
                  t]P                  t]P                  t	R t
R tR tR tR t]R 4       t]R 4       tR	tV tR
# )PathWalkTesti  c                r   V P                  4       P                  R 4      R,          pV\        9   d$   V P                  '       g   V P	                  R4       V P                  V P                  R4      V n        V P                  R,          V n        V P                  R,          V n	        V P                  R,          V n
        V P                  R,          V n        V P                  . R.3V n        V P                  V P                  R4      p\        P                  ! V P                  4       \        P                  ! V P                  4       \        P                  ! V4       V P                  R	,          pV P                  R
,          pV P                  R,          pV P                  V P                  RR4      pW4WV3 F7  p\        VRRR7      ;_uu_ 4       pVP!                  RV R24       RRR4       K9  	  V P                  '       d   V P                  R,          p	V P                  R,          p
\        P"                  ! W P                  RR7       \        P"                  ! RV	4       \        P"                  ! \        P$                  P'                  RR4      V
4       V P                  . . RO3V n        V P                  R,          pVR,          pV P                  R,          p\        P                  ! V4       VP)                  R4       V P                  '       dZ   \        P"                  ! W4       V P                  ^,          P+                  R4       V P                  ^,          P-                  4        \        P.                  ! V^ 4        \        P0                  ! V4       \        P.                  ! V\2        P4                  4       \        P6                  ! V4       \        P8                  ! V4       R#   + '       g   i     EKK  ; i  \:         d'    T P                  ^,          P+                  R4        R# i ; i)rP   r  TEST1SUB1SUB11SUB2r  tmp3TEST2tmp1tmp2tmp4wzutf-8)encodingzI'm z' and proud of it.  Blame test_pathlib.
Nbroken_linkbroken_link2Tr"  brokenSUB21broken_link3zI am tmp5, blame test_pathlib.rR   )rx  ry  r  rq  )rS   rT   r0   r'  rW   r   r  	walk_path	sub1_path
sub11_path	sub2_path	link_path	sub2_treer   makedirsr+  r,  r.  r   r*  rN  r  sortr-  listdirr  r  r,  r5  r2  )r   rZ   t2_path	tmp1_path	tmp2_path	tmp3_path	tmp4_pathr   r/  broken_link_pathbroken_link2_path
sub21_path	tmp5_pathbroken_link3_paths   &             r   r\   PathWalkTest.setUp  s   wwys#B'**43C3C3CMM-.$))W5&0..72&0&0.."vh7  ((499g.
DOO$
DNN#
GNNV+	NNV+	NNV+	HHTYY8	)>DdC'22a$tf$LMN 32 ? #~~= $ ?JJwDIJJx!12JJrww||FH57HI"nnb2abDNNNW,
'	 NN^;
J=>JJy4NN1$$^4NN1""$
Q	!JJz" HHZ.IIi HHZ 9 322.  	.NN1$$W-	.s   O0P 0P-P65P6c                    R V P                   ^,          9   d7   \        P                  ! V P                  R ,          \        P
                  4       \        P                  ! V P                  4       R# )r{  N)	r  r   r-  r  r  r  r   r3  r  r:   s   &r   r4  PathWalkTest.tearDown  s@    dnnQ''HHT^^g-t||<#r   c                :   . pV P                   P                  VP                  R 7      p\        V4      w  r4pV P	                  V. 4       RpW6,          pW6,          P                  R4      pVP                  V4        V U	U
u. uF  w  p	 qNK
  	  pp	p
V P                  V4       V P                  W{4       V P                  W4       V F#  pW8w  g   K  V P                  W<,          V4       K%  	  VP                  V4       R# u up
p	i   TP                  T4       i ; i))on_errorrn  z.newN)
r}  r  r  ry  ri   r   r  r}  r  r  )r   errorswalk_itrJ  dirsfilesrJ  path1path1newr   rP  rootsrK  s   &            r   test_walk_bad_dirPathWalkTest.test_walk_bad_dir  s    ..%%v}}%= ME$K,,V4X		#&-.g71aQgE.OOF#U*X-<MM$+u5  OOE" / OOE"s$   <D D>D D D Dc                   ^pV P                  V P                  R4      pV P                   ! V.R.V,          O5!  pVP                  RR7       \        ^d4       Uu. uF  qBP	                  RR7      NK  	  pp\        V^,           4       FB  pY6'       d   R.M. . 3pV F  pV P                  \        V4      V4       K   	  VP                  pKD  	  \        ^d4       Uu. uF  qBP	                  RR7      NK  	  ppTp\        V^,           4       F>  pY6V8  d   R.M. . 3pV F  pV P                  \        V4      V4       K   	  VR,          pK@  	  R# u upi u upi )rw  rx  r   Tr  Ftop_downN)r   r  r)  r   r  ri   ry  r  )	r   rz  r  r   rP  r|  r~  r   r}  s	   &        r   test_walk_many_open_files&PathWalkTest.test_walk_many_open_files  s0   xx		6*xx-e-

4
 49#J?JqE*J?uqy!Aqseb"5H  b84 ;;D	 " 49:>:aD):>uqy!A5yseb"=H  b84 #:D	 " @ ?s   EEc                p   ^(pV^
,           pV P                  V P                  R4      pVP                  ! R.V,          !  pVP                  RR7       \	        V4      ;_uu_ 4        \        VP                  4       4       \        VP                  RR7      4       RRR4       R#   + '       g   i     R# ; i)(   rx  r   Tr  Fr  N)r   r  r   r)  r
   r  r  r  s   &    r   test_walk_above_recursion_limit,PathWalkTest.test_walk_above_recursion_limit  s    )B.xx		6*}}u68

4
 00E*+ 1000s   %5B$$B5	c                    V P                   P                  R R7      pV F>  w  r#pW P                  8X  g   K  V P                  V. 4       V P                  VR.4        R# 	  V P	                  R4       R# )Tr  ru  z/Didn't follow symlink with follow_symlinks=TrueN)r}  r  r  ri   r,  r   r  rJ  r  r  s   &    r   test_walk_follow_symlinks&PathWalkTest.test_walk_follow_symlinks  sf    ..%%d%;!(D~~%  r*  1	 ") IIGHr   c                |   V P                   P                  R R7      pV F*  w  r#pW P                  8X  g   K  V P                  RV4        M	  V P	                  R4       V P                   P                  RR7      pV F+  w  r#pW P                  8X  g   K  V P                  RV4        R# 	  V P	                  R4       R# )Fr  r  zsymlink not foundTN)r}  r  r  r  r,  r  s   &    r   test_walk_symlink_location'PathWalkTest.test_walk_symlink_location  s     ..%%e%<!(D~~%fe, ")
 II)*..%%d%;!(D~~%fd+ ")
 II)*r   )r  r  r~  r  r  r}  N)r(   r=   r>   r?   r6   r.  r   r  r  r'  r\   r4  r  r  r  r1   r  r  r@   rA   rB   s   @r   rk  rk    sf     
,,C==D&&K?!B$
#(*
, I I + +r   rk  r   z'test requires a POSIX-compatible systemc                   .    ] tR tRt]P
                  tRtR# )PosixPathTesti%  r#   N)r(   r=   r>   r?   r6   r]  r   r@   r#   r   r   r  r  %  s    


Cr   r  z)test requires a Windows-compatible systemc                   .    ] tR tRt]P
                  tRtR# )WindowsPathTesti*  r#   N)r(   r=   r>   r?   r6   r\  r   r@   r#   r   r   r  r  *  s    


Cr   r  c                   D    ] tR tRt ! R R]P
                  4      tRtRtR# )PathSubclassTesti/  c                       ] tR tRtRtR# )PathSubclassTest.clsi0  r#   Nra   r#   r   r   r   r  0  r  r   r   Nr#   )	r(   r=   r>   r?   r6   r.  r   r:  r@   r#   r   r   r  r  /  s    gll   r   r  c                   @   a  ] tR tRt o  ! R R4      tR tR tRtV tR# )CompatiblePathTesti7  c                   2   a  ] tR tRt o R tR tR tRtV tR# )CompatiblePathTest.CompatPathi=  c                    Wn         R # r   string)r   r  s   &&r   r  &CompatiblePathTest.CompatPath.__init__D  s     Kr   c                B    \        V 4      ! V P                   R V 24      # r   rl   r  r   others   &&r   __truediv__)CompatiblePathTest.CompatPath.__truediv__G  s     :Qug677r   c                B    \        V 4      ! V R V P                   24      # r  r  r  s   &&r   __rtruediv__*CompatiblePathTest.CompatPath.__rtruediv__J  s     :q677r   r  N)	r(   r=   r>   r?   r  r  r  r@   rA   rB   s   @r   
CompatPathr  =  s     	!	8	8 	8r   r  c                z   \         P                  ! R 4      V P                  R4      ,          pV P                  WP                  4       V P	                  VP
                  R4       V P                  \        4      ;_uu_ 4        \         P                  ! R 4      ^
,           RRR4       R#   + '       g   i     R# ; i)testrightz
test/rightN)r6   r   r  r9   ri   r  r   r   r   r  s   & r   test_truedivCompatiblePathTest.test_truedivM  sy    !!&)DOOG,DDfoo65y))V$r) *)))   B))B:	c                z   V P                  R 4      \        P                  ! R4      ,          pV P                  WP                   4       V P	                  VP
                  R4       V P                  \        4      ;_uu_ 4        ^
\        P                  ! R4      ,           RRR4       R#   + '       g   i     R# ; i)leftr  z	left/testN)r  r6   r   r9   ri   r  r   r   r  s   & r   test_rtruediv CompatiblePathTest.test_rtruedivV  sy    (7+;+;F+CCfoo64y))!!&)) *)))r  r#   N)	r(   r=   r>   r?   r  r  r  r@   rA   rB   s   @r   r  r  7  s     8 8 ** *r   r  __main__)>r  r$  r  r   r  r   r   r6   r   rV   rC  r  rI  rb  r   urllib.requestr   test.supportr   r   r   r   r	   r
   r   test.support.os_helperr   r   r   r&  ImportErrorr  r  r  re  r  r   r$   r  r&   r-   r0   r+   r.   r1   TestCaser3   rE   rL   r  r	  r  r  rk  rc  rZ   r  r  r  r  r(   mainr#   r   r   <module>r     s#     	 	 
           ' & % : : + " @ @
 
2yZZ\Q&M u  % 

Sx00 SAX&& As@8$$ s@l   ", " <  Z$| Z$zH]+8$$ ]+@ 
D"KLH/  M 
D"MNh 3  O x  &*** &*R zMMO Mr  E  C#  Es6   2G$ 7G4  H $	G10G14HH	HH