+
    üÐj?  ã                  ó|   € R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
Ht ^ RIHt R R lt ! R	 R
]4      tR# )z0
Test cases covering L{twisted.python.zippath}.
)ÚannotationsN)ÚUnion)Ú_coerceToFilesystemEncoding)Ú
ZipArchiveÚZipPath)ÚAbstractFilePathTestsc               ó$   € V ^8„  d   QhRRRRRR/# )é   Údirnamezstr | bytesÚzfnameÚreturnÚNone© )Úformats   "ÚB/usr/lib/python3/dist-packages/twisted/python/test/test_zippath.pyÚ__annotate__r      s!   € ÷ *ñ *�;ð *¨ð *¸ñ *ó    c                óÆ  € \        RV 4      p\        RV4      p\        P                  ! VR4      ;_uu_ 4       p\        P                  ! V4       Fr  w  pppV Fe  p\        P
                  P                  WX4      p	\        P
                  P                  WX4      \        V 4      ^,           R p
VP                  Wš4       Kg  	  Kt  	  RRR4       R#   + '       g   i     R# ; i)zA
Create a zipfile on zfname, containing the contents of dirname'
Ú ÚwN)	r   ÚzipfileÚZipFileÚosÚwalkÚpathÚjoinÚlenÚwrite)r
   r   ÚcoercedDirnameÚcoercedZfnameÚzfÚrootÚignoredÚfilesÚfnameÚfspathÚarcpaths   &&         r   Úzipitr'      sª   € ô 1°°WÓ=€NÜ/°°FÓ;€Mä	�Š˜¨×	,Ô	,°ô
 �WŠW�^Ö$ñ	
ØØØã�ÜŸ™Ÿ™ dÓ2�ÜŸ'™'Ÿ,™, tÓ3´C¸³LÀ1Õ4DÐ4FÐG�Ø—‘˜Ö)ó ñ %÷ 
-×	,×	,Ò	,ús   ¸BCÃC 	c                  ól   € ] tR t^%t$ RtR]R&   R]R&   R R ltR R ltR	 R
 ltR R lt	R R lt
RtR# )ÚZipFilePathTestsz_
Test various L{ZipPath} path manipulations as well as reprs for L{ZipPath}
and L{ZipArchive}.
zZipArchive[bytes]r   r!   c               ó   € V ^8„  d   QhRR/# ©r	   r   r   r   )r   s   "r   r   ÚZipFilePathTests.__annotate__.   s   € ÷ Oñ O�tñ Or   c                	óº  € \         P                  ! V 4       \        V P                  V P                  R ,           4       \	        RV P                  4      V n        \        V P                  R ,           4      V n        V P                  V n        V P                   Uu. uF/  qP                  V P                  V P                  R ,           4      NK1  	  upV n	        R# u upi )s   .zipr   N)r   ÚsetUpr'   Úcmnr   Ú	nativecmnr   r   r!   ÚallÚreplace)ÚselfÚxs   & r   r.   ÚZipFilePathTests.setUp.   sŒ   € Ü×#Ò# DÔ)Üˆd�h‰h˜Ÿ™ 7Õ*Ô+Ü4°R¸¿¹ÓBˆŒÜ˜tŸx™x¨'Õ1Ó2ˆŒ	Ø—I‘IˆŒ	ØEIÇXÂXÓNÁXÀ—I‘I˜dŸh™h¨¯©°7Õ(:Ö;ÁXÑNˆŽùÒNs   Â5Cc               ó   € V ^8„  d   QhRR/# r+   r   )r   s   "r   r   r,   6   s   € ÷ Xñ X˜dñ Xr   c                ó¬   € V P                  V P                  P                  R4      P                  R4      V P                  P                  R4      4       R# )z6
L{ZipPath.sibling} returns a path at the same level.
ÚoneÚtwoN)ÚassertEqualr   ÚchildÚsibling)r3   s   &r   Útest_siblingÚZipFilePathTests.test_sibling6   s:   € ð 	×Ñ˜Ÿ™Ÿ™¨Ó/×7Ñ7¸Ó>ÀÇ	Á	ÇÁÐPUÓ@VÖWr   c               ó   € V ^8„  d   QhRR/# r+   r   )r   s   "r   r   r,   <   s   € ÷ 0ñ 0 $ñ 0r   c                ó.  € V P                   P                  R4      pRP                  \        P                   P	                  V P
                  R,           \        P                  ,           R,           4      4      pV P                  \        V4      V4       V P
                  P                  \        P                  ! 4       \        P                  ,           R^4      R,           p\        V4      pVP                  R4      pV P                  \        V4      V4       R# )zl
Make sure that invoking ZipPath's repr prints the correct class name
and an absolute path to the zip file.
ÚfoozZipPath({!r})ú.zipr   N)r   r;   r   r   Úabspathr0   Úsepr:   Úreprr2   Úgetcwdr   )r3   r;   ÚpathReprÚrelativeCommonÚrelpaths   &    r   Útest_zipPathReprÚ!ZipFilePathTests.test_zipPathRepr<   sÁ   € ð
 @D¿y¹y¿¹ÈuÓ?UˆØ"×)Ñ)Ü�G‰G�O‰O˜DŸN™N¨VÕ3´b·f±fÕ<¸uÕDÓEó
ˆð
 	×Ñœ˜e› hÔ/ð Ÿ™×/Ñ/´·	²	³¼b¿f¹fÕ0DÀbÈ!ÓLÈvÕUˆÜ˜^Ó,ˆØ—‘˜eÓ$ˆð 	×Ñœ˜e› hÖ/r   c               ó   € V ^8„  d   QhRR/# r+   r   )r   s   "r   r   r,   Q   s   € ÷ 
0ñ 
0°$ñ 
0r   c                ó.  € V P                   P                  R4      P                  R4      P                  R4      pRV P                  R,           \        P                  P                  . RO4      ,           ,          pV P                  \        V4      V4       R# )z“
The repr of a ZipPath with C{".."} in the internal part of its path
includes the C{".."} rather than applying the usual parent directory
meaning.
rA   ú..ÚbarzZipPath(%r)rB   N)r   rA   rN   rO   )r   r;   r0   r   rD   r   r:   rE   )r3   r;   rG   s   &  r   Ú test_zipPathReprParentDirSegmentÚ1ZipFilePathTests.test_zipPathReprParentDirSegmentQ   sk   € ð —	‘	—‘ Ó&×,Ñ,¨TÓ2×8Ñ8¸Ó?ˆØ Ø�N‰N˜VÕ#¤b§f¡f§k¡kÒ2JÓ&KÕKõ
ˆð 	×Ñœ˜e› hÖ/r   c               ó   € V ^8„  d   QhRR/# r+   r   )r   s   "r   r   r,   ]   s   € ÷ 2ñ 2 Tñ 2r   c                óÖ  € \        V P                  R,           4      pRP                  \        P                  P                  V P                  R,           4      4      pV P                  \        V4      V4       V P                  P                  \        P                  ! 4       \        P                  ,           R^4      R,           p\        V4      pV P                  \        V4      V4       R# )zo
Make sure that invoking ZipArchive's repr prints the correct class
name and an absolute path to the zip file.
rB   zZipArchive({!r})r   N)r   r0   r   r   r   rC   r:   rE   r2   rF   rD   )r3   r   rG   rH   rI   s   &    r   Útest_zipArchiveReprÚ$ZipFilePathTests.test_zipArchiveRepr]   s¡   € ô
 ˜$Ÿ.™.¨6Õ1Ó2ˆØ%×,Ñ,¬R¯W©W¯_©_¸T¿^¹^ÈfÕ=TÓ-UÓVˆð 	×Ñœ˜d› XÔ.ð Ÿ™×/Ñ/´·	²	³¼b¿f¹fÕ0DÀbÈ!ÓLÈvÕUˆÜ˜^Ó,ˆð 	×Ñœ˜g›¨Ö1r   )r1   r0   r   r!   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotations__r.   r=   rJ   rP   rT   Ú__static_attributes__r   r   r   r)   r)   %   s5   ‡ ñð
 ÓØ
ÓõOõXõ0õ*
0÷2ñ 2r   r)   )rZ   Ú
__future__r   r   r   Útypingr   Útwisted.python.filepathr   Útwisted.python.zippathr   r   Útwisted.test.test_pathsr   r'   r)   r   r   r   Ú<module>rb      s5   ðñõ #ã 	Û Ý å ?ß 6Ý 9õ*ô&H2Ð,ö H2r   