+
    BiU                        ^ 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Ht ^RIHt ^RIHt ^RIHtHt  ! R R4      tR R	 ltR
 t]P.                  ! ]4      ]P.                  ! ]! ]P0                  P2                  P4                  ]4      4      .t]! R.]4      t ! R R]P:                  4      t ! R R]P>                  4      t R# )    N)FakePathtemp_dir)compose)Counter)Invokedparameterizec                   *    ] tR t^t ! R R4      tRtR# )jaracoc                       ] tR t^t]tRtR# )jaraco.itertools N)__name__
__module____qualname____firstlineno__r   __static_attributes__r       8/usr/lib/python3.14/test/test_zipfile/_path/test_path.py	itertoolsr      s    r   r   r   N)r   r   r   r   r   r   r   r   r   r
   r
      s     r   r
   c                8    V ^8  d   QhR\         P                  /# )   info)zipfileZipInfo)formats   "r   __annotate__r      s     - -W__ -r   c                 b    V ;P                   \        P                  ^,          ,          un         R# )   N)external_attrstatS_IFLNK)r   s   &r   
_make_linkr"      s    $,,",,r   c                     \         P                  ! 4       p \        P                  ! V R 4      pVP	                  RR4       VP	                  RR4       VP	                  RR4       VP	                  RR4       VP	                  R	R
4       VP	                  RR4       VP	                  RR4       VP	                  RR4       VP	                  RR4       \        VP                  4       R,          4       RVn        V# )wa.txts   content of azb/c.txts   content of cz	b/d/e.txts   content of ezb/f.txts   content of fz	g/h/i.txts   content of izj/k.bins   content of kzj/l.bazs   content of lzj/m.bars   content of mzn.txts   a.txtzalpharep.zip)ioBytesIOr   ZipFilewritestrr"   infolistfilename)datazfs     r   build_alpharep_fixturer/      s    @ ::<D	s	#BKK)KK	?+KK_-KK	?+KK_-KK	?+KK	?+KK	?+KK"r{{}R ! BKIr   alpharepc            	         a  ] tR t^Ut o R tR t]R 4       t]R 4       t]R 4       t	]R 4       t
]R 4       tR tR	 t]P                  ! ]! ]P$                  R
^ 4      '       * R4      ]R 4       4       tR 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 4       t!R@t"R t#R 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       t0]R) 4       t1]R* 4       t2]R+ 4       t3]R, 4       t4]R- 4       t5]R. 4       t6]R/ 4       t7R0 t8]R1 4       t9]R2 4       t:]R3 4       t;]R4 4       t<]=! . RAO]>P~                  ! ]@]A]B.R5R6.4      4      R7 4       tC]R8 4       tD]R9 4       tER: tFR; tGR< tH]R= 4       tIR>tJV tKR?# )BTestPathc                    \         P                  ! 4       V n        V P                  V P                  P                  4       R # N)
contextlib	ExitStackfixtures
addCleanupclose)selfs   &r   setUpTestPath.setUpV   s(    ",,.++,r   c                z   \         P                  ! V P                  P                  \	        4       4      4      pVP
                  pVP                  4        W!P                  ,          pVP                  R 4      ;_uu_ 4       pVP                  VP                  4       4       RRR4       V#   + '       g   i     T# ; i)wbN)pathlibPathr7   enter_contextr   fpr9   r,   openwritegetvalue)r:   r0   tmpdirbufferpathstrms   &&    r   zipfile_ondiskTestPath.zipfile_ondiskZ   s{    dmm99(*EF)))YYt__JJv()  _s   ? B))B:	c                    \         P                  ! V4      pVP                  4       w  r4rVpVP                  4       w  rp
V
P                  4       w  pVP                  4       w  pVP                  4       w  pR # r4   r   r@   iterdir)r:   r0   rootanbgjcfdehis   &&            r   test_iterdir_and_typesTestPath.test_iterdir_and_typesc   sY    ||H%aA ))+ayy{yy{yy{r   c                2    \         P                  ! V4      pR # r4   r   r@   r:   r0   rO   s   && r   test_is_file_missingTestPath.test_is_file_missings       ||H%r   c                    \         P                  ! V4      pVP                  4       w  r4rVpV P                  \        4      ;_uu_ 4        VP                  4        R R R 4       R #   + '       g   i     R # ; ir4   )r   r@   rN   assertRaises
ValueErrorr:   r0   rO   rP   rQ   rR   rS   rT   s   &&      r   test_iterdir_on_fileTestPath.test_iterdir_on_filex   sJ    ||H%aAz**IIK +***s   A##A4	c                2    \         P                  ! V4      pR # r4   r^   r_   s   && r   test_subdir_is_dirTestPath.test_subdir_is_dir   rb   r   c                   \         P                  ! V4      pVP                  4       w  r4rVpVP                  R R7      ;_uu_ 4       pVP	                  4       p	RRR4       V P                  X	R4       VP                  RR 4      ;_uu_ 4       pVP	                  4       p	RRR4       V P                  V	R4       R#   + '       g   i     Li; i  + '       g   i     L7; i)utf-8encodingNzcontent of ar)r   r@   rN   rC   readassertEqual)
r:   r0   rO   rP   rQ   rR   rS   rT   rI   r-   s
   &&        r   	test_openTestPath.test_open   s    ||H%aAVVWV%%99;D &~.VVC!!T99;D "~. &% "!s   B7
C
7C	
C	c                :   \         P                  ! 4       p\        P                  ! VR 4      pVP	                  RRP                  R4      4       RVn        \        P                  ! V4      pVP                  4       w  pVP                  R4      pVP                  RR4      ;_uu_ 4       pVP                  4       pRRR4       VP                  RR7      ;_uu_ 4       pVP                  4       pRRR4       R#   + '       g   i     LE; i  + '       g   i     R# ; i)	r$   zpath/16.txtzThis was utf-16zutf-16ztest_open_utf16.zipz16.txtrp   Nrn   )r'   r(   r   r)   r*   encoder,   r@   rN   joinpathrC   rq   )r:   in_memory_filer.   rO   rH   u16rI   r-   s   &       r   test_open_encoding_utf16!TestPath.test_open_encoding_utf16   s    __^S1
M#4#;#;H#EF+||B,,.mmH%XXc8$$99;D % XXxX((D99;D )( %$ )((s   (C6D	6D		D	c           	     6   \         P                  ! 4       p\        P                  ! VR 4      pVP	                  RR4       RVn        \        P                  ! V4      pVP                  4       w  pVP                  R4      pVP                  RRR7      pVP                  RRR	R7      ;_uu_ 4       pR
R
R
4       V P                  \        R4      ;_uu_ 4        VP                  RRR7      pR
R
R
4       VP                  RRRR7      ;_uu_ 4       pV P                  \        4      ;_uu_ 4        VP                  4        R
R
R
4       R
R
R
4       R
#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L@; i  + '       g   i     R
# ; i)r$   zpath/bad-utf8.bins   invalid utf-8: .z"test_read_text_encoding_errors.zipzbad-utf8.binrm   ignore)errorsrp   surrogateescapeNro   rn   strict)ro   r~   )r'   r(   r   r)   r*   r,   r@   rN   rw   	read_textrC   assertRaisesRegex	TypeErrorrd   UnicodeDecodeErrorrq   )r:   rx   r.   rO   rH   ry   r-   rV   s   &       r   test_open_encoding_errors"TestPath.test_open_encoding_errors   s    __^S1
')DE:||B,,.mmN+ }}WX}6XXc7+<X=== ##Iz::==7=;D ; XXcGHX==""#566 7 >= >= ;: 76 >==s<   .EE!F+E4	<FE	!E1	4F?FF	warn_default_encodingzRequires warn_default_encodingc                   \         P                  ! V4      pV P                  \        4      ;_uu_ 4       pVP	                  R 4      P                  4        RRR4       V P                  \        4      ;_uu_ 4       pVP	                  R 4      P                  R4      P                  4        RRR4       R#   + '       g   i     Lf; i  + '       g   i     R# ; i)r%   Nrp   )r   r@   assertWarnsEncodingWarningrw   r   rC   r9   )r:   r0   rO   wcs   &&  r   test_encoding_warningsTestPath.test_encoding_warnings   s     ||H%o.."MM'",,. / o.."MM'"'',224 /. /. /..s    B29/C2C	C	c                   \         P                  ! \         P                  ! \        P                  ! 4       R R7      4      pVP                  R4      P                  R4      ;_uu_ 4       pVP                  R4       RRR4       VP                  R4      P                  R RR7      ;_uu_ 4       pVP                  R	4       RRR4       R#   + '       g   i     LV; i  + '       g   i     R# ; i)
r$   )modezfile.binr>   s   binary contentsNzfile.txtrm   rn   z	text file)r   r@   r)   r'   r(   rw   rC   rD   )r:   r.   rI   s   &  r   test_open_writeTestPath.test_open_write   s    
 \\'//"**,SAB[[$))$//4JJ)* 0[[$))#)@@DJJ{# A@ 0/@@@s   (C,CC	C,	c                    \         P                  ! V4      pV P                  \        4      ;_uu_ 4        VP	                  R 4      P                  4        RRR4       R#   + '       g   i     R# ; i)rR   N)r   r@   rd   IsADirectoryErrorrw   rC   r:   r0   r.   s   && r   test_open_extant_directory#TestPath.test_open_extant_directory   H    
 \\(#011KK!!# 2111    AA/	c                   \         P                  ! V4      pV P                  \        4      ;_uu_ 4        VP	                  R 4      P                  RRR7       RRR4       V P                  \        4      ;_uu_ 4        VP	                  R 4      P                  RR4       RRR4       R#   + '       g   i     LY; i  + '       g   i     R# ; i)r%   rbrm   rn   N)r   r@   rd   re   rw   rC   r_   s   && r   test_open_binary_invalid_args&TestPath.test_open_binary_invalid_args   s    ||H%z**MM'"''w'? +z**MM'"''g6 +* +****s   #B(<"B;(B8	;C	c                    \         P                  ! V4      pV P                  \        4      ;_uu_ 4        VP	                  R 4      P                  4        RRR4       R#   + '       g   i     R# ; i)zN)r   r@   rd   FileNotFoundErrorrw   rC   r   s   && r   test_open_missing_directory$TestPath.test_open_missing_directory   r   r   c                Z    \         P                  ! V4      pVP                  4       w  r4rVpR # r4   rM   rf   s   &&      r   	test_readTestPath.test_read   s!    ||H%aAr   c                    \         P                  ! V4      pVP                  R 4      pVP                  R4      P                  R4      P                  R4      pR# r%   rR   rW   e.txtNr   r@   rw   r:   r0   rO   rP   rX   s   &&   r   test_joinpathTestPath.test_joinpath   sB    ||H%MM'"MM#'',55g>r   c                X    \         P                  ! V4      pVP                  R RR4      pR# )rR   rW   r   Nr   )r:   r0   rO   rX   s   &&  r   test_joinpath_multipleTestPath.test_joinpath_multiple   s"    ||H%MM#sG,r   c                r    \         P                  ! V4      pVR ,          pVR,          R,          R,          pR# r   r^   r   s   &&   r   test_traverse_truedivTestPath.test_traverse_truediv  s,    ||H%7N3Jw&r   c                |    V P                  V4      p\        \        V4      4      p\        P                  ! V4       R # r4   )rJ   r   strr   r@   )r:   r0   rJ   pathlikes   &&  r   test_pathlike_construction#TestPath.test_pathlike_construction  s/    
 ,,X6C/0Xr   c                V    \         P                  ! V4      pV\        R 4      ,           R# )rP   N)r   r@   r   r_   s   && r   test_traverse_pathlikeTestPath.test_traverse_pathlike  s    ||H%x}r   c                2    \         P                  ! V4      pR # r4   r^   r_   s   && r   test_parentTestPath.test_parent  rb   r   c                2    \         P                  ! V4      pR # r4   r^   r_   s   && r   test_dir_parentTestPath.test_dir_parent"  rb   r   c                2    \         P                  ! V4      pR # r4   r^   r_   s   && r   test_missing_dir_parent TestPath.test_missing_dir_parent(  rb   r   c                    \         P                  ! V4      pVP                  4       w  r4rVpVP                  R R4       VP                  RR4       VR,          P                  4       w  pR# )zfoo.txtfoozbar/baz.txtbazbarN)r   r@   rN   r*   )	r:   r0   rO   rP   rQ   rR   rS   rT   r   s	   &&       r   test_mutabilityTestPath.test_mutability-  sY     ||H%aA)U+-/ ,'')r   c                    \         P                  ! 4       p\        P                  ! VR 4      p\	        \
        \        V P                  4      4       F  pVP                  W34       K  	  RVn	        V# )r$   rp   )
r'   r(   r   r)   mapr   rangeHUGE_ZIPFILE_NUM_ENTRIESr*   r   )r:   rI   r.   entrys   &   r   huge_zipfileTestPath.huge_zipfile>  sR    zz|__T3'eD$A$ABCEKK% D	r   c                    \         P                  ! V P                  4       4      p\        P                  P                  VP                  4       4      pV F  pVP                  R 4       K  	  R# )suffixN)r   r@   r   r
   r   r   rN   rw   )r:   rO   entriesr   s   &   r   test_joinpath_constant_time$TestPath.test_joinpath_constant_timeG  sM     ||D--/0""**4<<>:ENN8$ r   c                   V P                  V4      p\        P                  ! V4      ;_uu_ 4       p\        ^4       F*  p\        P                  ! VR4      P                  RR7       K,  	  RRR4       R#   + '       g   i     R# ; i)r   r%   rm   rn   N)rJ   r   r)   r   r@   r   )r:   r0   filereps   &&  r   test_read_does_not_close!TestPath.test_read_does_not_closeR  s\    &&x0__X&&$QxT7+55w5G   '&&&s   :A44B	c                H     ! R  R\         P                  4      pV! V4      pR# )c                       ] tR tRtRtR# )(TestPath.test_subclass.<locals>.Subclassi[  r   N)r   r   r   r   r   r   r   r   Subclassr   [  s    r   r   Nr^   )r:   r0   r   rO   s   &&  r   test_subclassTestPath.test_subclassY  s    	w|| 	 !r   c                2    \         P                  ! V4      pR # r4   r^   r_   s   && r   test_filenameTestPath.test_filenamea  rb   r   c                2    \         P                  ! V4      pR # r4   r^   r_   s   && r   test_root_nameTestPath.test_root_namef  s    
 ||H%r   c                P    \         P                  ! V P                  V4      4      pR # r4   )r   r@   rJ   r_   s   && r   test_root_on_diskTestPath.test_root_on_diskn  s     ||D//9:r   c                v    \         P                  ! V4      pVR ,          pVR,          R,          pVR,          pR# b.txtrU   filename.tar.gzrW   Nr^   r:   r0   rO   rR   rU   rW   s   &&    r   test_suffixTestPath.test_suffixy  s9     ||H% 7N 3J** 3Jr   c                    \         P                  ! V4      pVR ,          pVR,          R,          pVR,          pVR,          pR# )r   rU   r   rW   z.hgrcNr^   )r:   r0   rO   rR   rU   rW   rX   s   &&     r   test_suffixesTestPath.test_suffixes  sD     ||H% 7N 3J** 3J 7Nr   c                @    R Vn         \        P                  ! V4      pR # r4   )r,   r   r@   r_   s   && r   test_suffix_no_filename TestPath.test_suffix_no_filename  s     ||H%r   c                v    \         P                  ! V4      pVR ,          pVR,          R,          pVR,          pR# r   r^   r   s   &&    r   	test_stemTestPath.test_stem  s9    
 ||H% 7N 3J** 3Jr   c                T    \         P                  ! V4      pR VP                  n        R# )zfoo/bar.zipN)r   r@   rO   r,   r_   s   && r   test_root_parentTestPath.test_root_parent  s    ||H%*		r   c                f   R Vn         \        P                  ! V4      pV P                  \        4      ;_uu_ 4        VP
                   R R R 4       V P                  \        4      ;_uu_ 4        VP                   R R R 4       VR,          pR #   + '       g   i     LM; i  + '       g   i     L.; i)NrR   )r,   r   r@   rd   r   nameparent)r:   r0   rO   subs   &&  r   test_root_unnamedTestPath.test_root_unnamed  so     !||H%y))II *y))KK * Sj *)))s   B-B B	 B0	c                2    \         P                  ! V4      pR # r4   r^   r_   s   && r   test_match_and_globTestPath.test_match_and_glob  rb   r   c                T    \         P                  ! V4      pVP                  R 4      pR# )z**/*.txtN)r   r@   glob)r:   r0   rO   filess   &&  r   test_glob_recursiveTestPath.test_glob_recursive  s    ||H%		*%r   c                2    \         P                  ! V4      pR # r4   r^   r_   s   && r   test_glob_dirsTestPath.test_glob_dirs  rb   r   c                2    \         P                  ! V4      pR # r4   r^   r_   s   && r   test_glob_subdirTestPath.test_glob_subdir  rb   r   c                2    \         P                  ! V4      pR # r4   r^   r_   s   && r   test_glob_subdirsTestPath.test_glob_subdirs  rb   r   c                2    \         P                  ! V4      pR # r4   r^   r_   s   && r    test_glob_does_not_overmatch_dot)TestPath.test_glob_does_not_overmatch_dot  rb   r   c                2    \         P                  ! V4      pR # r4   r^   r_   s   && r   test_glob_single_charTestPath.test_glob_single_char  rb   r   c                2    \         P                  ! V4      pR # r4   r^   r_   s   && r   test_glob_charsTestPath.test_glob_chars	  rb   r   c                   \         P                  ! \         P                  ! \        P                  ! 4       R 4      4      pV P                  \        4      ;_uu_ 4        VP                  R4       RRR4       R#   + '       g   i     R# ; i)r$    N)r   r@   r)   r'   r(   rd   re   r  )r:   rO   s   & r   test_glob_emptyTestPath.test_glob_empty  sL    ||GOOBJJL#>?z**IIbM +***s   A88B		c                ^    \         P                  ! V4      p\         P                  ! V4      pR # r4   r^   r_   s   && r   test_eq_hashTestPath.test_eq_hash  s     ||H% ||H%r   c                2    \         P                  ! V4      pR # r4   r^   r_   s   && r   test_is_symlinkTestPath.test_is_symlink"  rb   r   c                    \         P                  ! V4      pVP                  R R4      P                  VR ,          4      pVP                  R RR4      P                  VR ,          4      pR# )rR   zc.txtrW   r   N)r   r@   rw   relative_to)r:   r0   rO   relatives   &&  r   test_relative_toTestPath.test_relative_to(  sR    ||H%==g.::4#:F ==c73??s
Kr   c                    \        R \        P                  3/ 4      pV! V4      P                  R4      P                  pR# )	PathChildzsome dirN)typer   r@   rw   r   )r:   r0   clsr   s   &&  r   test_inheritanceTestPath.test_inheritance1  s0    ;48}%%j188r   r  zb/c                    V! \        V P                  V4      4      4      p\        P                  ! \        P
                  ! WCR 7      4      p\        P                  ! V4      pVP                  4       vrxR# ))atN)r   rJ   pickledumpsr   r@   loadsrN   )	r:   r0   	path_typesubpathrJ   saved_1
restored_1firstrests	   &&&&     r   test_pickleTestPath.test_pickle7  sU     #3t':':8'D#EF,,w||NGH\\'*
!))+r   c                    V P                  V4      p\        P                  ! V4      p\        P                  ! V4       VP	                  VP
                  4       R # r4   )rJ   r   r)   r@   
extractallr   )r:   r0   source_pathr.   s   &&  r   #test_extract_orig_with_implied_dirs,TestPath.test_extract_orig_with_implied_dirsG  s@    
 ))(3__[)R
k(()r   c                    \         P                  ! V4       V P                  \        4      ;_uu_ 4        VP	                  R 4       RRR4       R#   + '       g   i     R# ; i)zdoes-not-existN)r   r@   rd   KeyErrorgetinfo)r:   r0   s   &&r   test_getinfo_missingTestPath.test_getinfo_missingR  s?    
 	Xx((-. )(((s   AA!	c                   \         P                  ! 4       p\        P                  ! VR 4      pVP	                  RR4       VP	                  RR4       VP	                  RR4       RVn        \        P                  ! V4      pR# )r$   z/one-slash.txt   contentz//two-slash.txtz../parent.txtr  N)r'   r(   r   r)   r*   r,   r@   )r:   r-   r.   rO   s   &   r   test_malformed_pathsTestPath.test_malformed_paths[  s`     zz|__T3'
$j1
%z2
OZ0||Br   c                    \         P                  ! 4       p\        P                  ! VR 4      pVP	                  RR4       VP	                  RR4       RVn        \        P                  ! V4      pVP                  4       pR# )r$   zpath?rI  zV: NMS.flacs   fLaC...r  N)r'   r(   r   r)   r*   r,   r@   rN   )r:   r-   r.   rO   contentss   &    r   test_unsupported_namesTestPath.test_unsupported_namesm  s[     zz|__T3'
GZ(
M:.||B<<>r   c                   \         P                  ! 4       p\        P                  ! VR 4      pVP	                  \        R4      P                  V4      R4       RVn        \        P                  ! V4      pVP                  4       w  pR# )r$   zfoo\barrI  r  N)
r'   r(   r   r)   r*   DirtyZipInfo_for_archiver,   r@   rN   )r:   r-   r.   rO   r:  s   &    r   test_backslash_not_separator%TestPath.test_backslash_not_separator  s_     zz|__T3'
L,99"=zJ||B<<>r   c                >    ^ RI Hp \        P                  ! V4      pR# )r   )TraversableN)importlib.resources.abcrV  r   r@   )r:   r0   rV  r.   s   &&  r   test_interfaceTestPath.test_interface  s    7\\(#r   )r7   Ni    )r0   r6  r7  )Lr   r   r   r   r;   rJ   pass_alpharepr[   r`   rg   rj   rs   rz   r   unittestskipIfgetattrsysflagsr   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  r  r  r  r  r  r!  r$  r)  r/  r   r   productalpharep_generatorsr   r   r<  rA  rF  rJ  rN  rS  rX  r   __classdictcell__)__classdict__s   @r   r2   r2   U   s=    -   : :   & & / /)2 __CII6::( 	' 	
	'	$ $ $ 7 7 $ $ 1 1 ? ? ? ?
 ? ?     4 4
 - -
 7 7 8 8  %	> H H 0 0 = = A A = =  $    * 7 7 : :$ 2 2  " 
 
 H H G G
 L L
 T T - -
 0 0 
 

   3 3
 * * % %
 ,(OJ	
KK * * / /U$G&( + +r   r2   c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )rQ  i  c                <   < \         SV `  ! V.VO5/ VB  Wn        R # r4   )super__init__r,   )r:   r,   argskwargs	__class__s   &&*,r   rg  DirtyZipInfo.__init__  s    3D3F3 r   )r,   )r   r   r   r   rg  r   rb  __classcell__)rj  rc  s   @@r   rQ  rQ    s     
! !r   rQ  )!r5   r'   r   r?   r3  r    r^  r[  r   zipfile._pathtest.support.os_helperr   r   
_functoolsr   
_itertoolsr   _test_paramsr   r   r
   r"   r/   wrap_pathCompleteDirsinjectra  rZ  TestCaser2   r   rQ  r   r   r   <module>rw     s     	     
    5   / 
-.d LL'(LL33::<RST 
 j\+>?}+x   }+@!7?? !r   