403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.51
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/__pycache__/test_tarfile.cpython-315.opt-1.pyc
R
>lqjk@c�f�]PHs]PHs]PHs]PHs]QHGs]QHGsGs]QH$G
s
]PH,s]PH0s]PH4s
]PH8s]PH<s]PH@s]PHDs]PHHs]PHLs]QHPGs]QHPGs]QH\Gs]QH\Gs]QH\Gs]PHns]PHvs]PHzs]PH~s]Q	H�G!s!Q
s"\OFOI\OJ2Q*s&\&Q*s'\OPQ
QQ5s)\OFOU\&Q2s+\OFOU\&Q2s,\OFOU\&Q2s-\OFOU\&Q2s.\OFOU\&Q2s/\OFOU\&Q2s0Qs1Qs2Qs3QQ2s4\Oj2QQ22s6\On2QQ22s8\Or2QQ 22s:\Ov2Q!Q"22s<Q#Q$\42s=Q%Q&\=2s>Q'Q(\=\O~2s@Q)Q*\6\@2sAQ+Q,\8\@2sBQ-Q.\:\@2sCQ/Q0\<\@2sDQ1Q2\=\O~2sEQ3Q4\6\E2sFQ5Q6\8\E2sGQ7Q8\:\E2sHQ9Q:\<\E2sIQ;Q<\=2sJQ=Q>\O�2sL\O�Q?Q@\O~22sNQAQB\J2sOQCQD2sPQEQF\O\O~2sQQGQH\6\P\O\O~2sRQIQJ\8\O\O~2sSQKQL\:\O\O~2sTQMQN\<\O\O~2sUQOQP\J\O~2sVQQQR\6\P\V2sWQSQT\8\V2sXQUQV\:\V2sYQWQX\<\V2sZQYQZ\>\O~2s[Q[Q\\6\[2s\Q]Q^\8\[2s]Q_Q`\:\[2s^QaQb\<\[2s_QcQd\4\O~2s`QeQf\6\`2saQgQh\8\`2sbQiQj\:\`2scQkQl\<\`2sdQmQn\6\O~2seQoQp\=\O~2sfQqQr2sgQsQt\g\=\O~2shQuQv\g\=\O~2siQwQx\42sjQyQz\j\O~2skQ{Q|\6\k2slQ}Q~\8\k2smQQ�\:\k2snQ�Q�\<\k2soQ�Q�\j\O~2spQ�Q�\6\p2sqQ�Q�\8\p2srQ�Q�\:\p2ssQ�Q�\<\p2stQ�Q�\42suQ�Q�\8\u\O~2svQ�Q�\8\u\O~2swQ�Q�\6\u\O~2sxQ�Q�\6\u\O~2syQ�Q�\O~2szQ�Q�\O~2s{Q�Q�\j\O~2s|Q�Q�\j\O~2s}Q�Q�\6\}2s~Q�Q�\8\}2sQ�Q�\:\}2s�Q�Q�\<\}2s�Q�Q�\}2s�\CO\�\Q�2Q�2Q�Q�\O~22s�Q�Q�\{2s�Q�Q�2s�Q�Q�\�\O~2s�Q�Q�\�\O~2s�Q�Q�\�\O~2s�Q�Q�2s�Q�Q�\�\O~2s�Q�Q�\6\�\O~2s�Q�Q�\8\�\O~2s�Q�Q�\:\�\O~2s�Q�Q�\<\�\O~2s�Q�Q�\O~2s�Q�Q�\O~2s�Q�Q�\O~2s�Q�Q�\O~2s�\CO*\�\Q�2Q�2Q�Q�\=\O~22s�Q�Q�\8\O~2s�Q�s�\CO\�\Q�2Q�2\CO\�\Q�2Q�2Q�Q�\O~222s�Q�Q�\=\O~2s�Q�Q�\=2s�Q�Q�\�\O~2s�Q�Q�\�\O~2s�Q�Q�\�\O~2s�Q�Q�\�\O~2s�Q�Q�\O~2s�Q�s�Q�Q�2s�\COF%cQ�s�LQ�s�Q�Q�\O~2s�Q�Q�\COL\O~2s�Q�Q�\O~2s�Q�Q�\O~2s�Q�s�Q�s�\�Q�6Xc\COX2P!P!\cPsC	Kh9h\cPsC	K
h9h\cPsC	Kh9h\cPsC	K#h9h\cPs!C	K,h9h)��)�sha256)�contextmanager�	ExitStack)�Random)�archiver_tests)�support)�	os_helper)�
script_helper)�warnings_helper)�zstdc�6�[U2O2!�N)r�	hexdigest)�datas&�&C:\Python315\\Lib\test\test_tarfile.py�	sha256sumr/s���$�<�!�!�#�#�z-tardirz
-extract-testztesttar.tar�archivetestdata��subdirztesttar.tar.gzztesttar.tar.bz2�testtar.tar.xzztesttar.tar.zstztmp.tar�testtar� �@e09e4bc8b3c9d9177e77256353b36c159f5f040531bbd4b024a8f9b9196c71ce�@4f05a776071146756345ceee937b33fc5644f5a96b9780d1c7d6a32cdf164d7bc�~`�\sQs]Esn\sPs\Os\	OOs\Q2s
QsUsP!)�TarTestc�>�UOUO*!r
)�prefix�suffix��selfs&r�mode�TarTest.modeKs���{�{�T�[�[�(�(r�)�__name__�
__module__�__qualname__�__firstlineno__�tarnamer�io�FileIO�open�tarfile�TarFile�taropen�propertyr"�__static_attributes__�__classdictcell__��
__classdict__s@rrrEs9�����G�
�F�
�9�9�D��o�o�%�%�G�
�)��)rrc�x�\sQs]Os\sQs\%c
\OLPs	\
OOs
QsP!)�GzipTest�gzr$)r%r&r'r(�gzipnamer)r�gzip�GzipFiler,r-r.�gzopenr/r1r$rrr6r6Os(���G�
�F� �4�=�=�d�D��o�o�$�$�Grr6c�x�\sQs]Vs\sQs\%c
\OLPs	\
OOs
QsP!)�Bz2Test�bz2r$)r%r&r'r(�bz2namer)rr>�BZ2Filer,r-r.�bz2openr/r1r$rrr=r=Vs(���G�
�F��3�;�;�4�D��o�o�%�%�Grr=c�x�\sQs]]s\sQs\%c
\OLPs	\
OOs
QsP!)�LzmaTest�xzr$)r%r&r'r(�xznamer)r�lzma�LZMAFiler,r-r.�xzopenr/r1r$rrrCrC]s(���G�
�F� �4�=�=�d�D��o�o�$�$�GrrCc�x�\sQs]ds\sQs\%c
\OLPs	\
OOs
QsP!)�ZstdTest�zstr$)r%r&r'r(�zstnamer)rr�ZstdFiler,r-r.�zstopenr/r1r$rrrJrJds(���G�
�F� �4�=�=�d�D��o�o�%�%�GrrJc�2`�\sQs]ksnQsQsQsQsUsP!)�ReadTest�r:c�l�[OUOUOQQ5UmP!)�	iso8859-1�r"�encoding�r-r,r)r"�tarr s&r�setUp�ReadTest.setUpos!���<�<����4�9�9�)4�6��rc�<�UOO2P!r
)rW�closer s&r�tearDown�ReadTest.tearDownss�������r�rW)	r%r&r'r(rrXr\r1r2r3s@rrPrPks����
�F�6��rrPc�(`�\sQs]vsnQsQsUsP!)�StreamModeTestc�n�[OUOUOQP	Q5UmP!)rS)r"rU�streamrVr s&rrX�StreamModeTest.setUpzs$���<�<����4�9�9�)4�'+�-��rr^)r%r&r'r(rXr1r2r3s@rr`r`vs����-�-rr`c��`�\sQs]snQsQsQsQsQsQs	Qs
QsQ	sQ
s
QsQs\O"\\Q
29%c
\\Q2Q2Q2sQsUsP!)�
UstarReadTestc�j�UOOQ2oUOOU29^tt^2oUO2oUO	[U2UOQ2UO	[U2[Q2PPP2P!)%fhP!9h)�
ustar/regtype�regular file extraction failed)	rW�	getmember�extractfile�read�assertEqual�len�sizer�sha256_regtype�r!�tarinfo�fobjrs&   r�test_fileobj_regular_file�'UstarReadTest.test_fileobj_regular_file�s}���(�(�$�$�_�5��
�X�X�
!�
!�'�
*�
*�d��9�9�;�D����S��Y����4�
6����Y�t�_�n�4�
6�	+�
*�
*�
*�s�AB!�!B2	�*B2	c��UOOQ[QQ5UOOQ2o[	[
OO[Q2Q29^tt^2oUO2oPPP2UOOU29^tt^2o[OU2oUO2oUOWUQ2UO[U2]rQ2UOU]S*QQ2PPP2P!)%fhK�9h)%fhP!9h)rgr��filter�rzfileobj.readlines() failedzOI will gladly admit that Python is not the fastest running scripting language.
)rW�extract�TEMPDIRrir,�os�path�join�	readlinesrjr*�
TextIOWrapperrlrm)r!rq�fobj1�lines1rr�fobj2�lines2s&      r�test_fileobj_readlines�$UstarReadTest.test_fileobj_readlines�s���������'�&��A��(�(�$�$�_�5��
�"�'�'�,�,�w��8�#�
>�
>�%��_�_�&�F�?��X�X�
!�
!�'�
*�
*�d��$�$�T�*�E��_�_�&�F����V�V�0�
2����S��[�#�0�
2����V�B�Z�4�0�
2�+�
*�?�
>��+�
*�
*�s%�5D+�1A0D>�+D;	�4D;	�>E	�E	c�*�UOOQ[QQ5UOOQ2o[	[
OO[Q2Q29^tt^2oUO2oPPP2UOOU29^tt^2o[[OU22oUOWUQ2PPP2P!)%fhKp9h)%fhP!9h)rgrrvrxzfileobj.__iter__() failed)rWryrzrir,r{r|r}r~rj�listr*rrl)r!rqr�r�r�r�s&     r�test_fileobj_iter�UstarReadTest.test_fileobj_iter�s���������'�&��A��(�(�$�$�_�5��
�"�'�'�,�,�w��8�#�
>�
>�%��_�_�&�F�?�
�X�X�
!�
!�'�
*�
*�e��"�*�*�5�1�2�F����V�V�/�
1�+�
*�?�
>��
*�
*�
*�s$�5C.�13D�.C>	�7C>	�D	�
D	c	��UOOQ[QQ5[[O
O
[Q2Q29^tt^2oUO2oPPP2UOOQ2oUOOU29^tt^2oUO2oUO]2UO]UO2Q2UOQ]2UOQUO2Q2UOQ]2UOQUO2Q2UOQ]2UOQUO2Q	2UO]
2oUOUWQ
*Q2UO]]2UOUOUO2Q2UOUO2Q
Q2UOUO']2UO]UO2Q2UOQ2UO2oUOQ2UO2oUOVgQ2UO]2UO[UO!22UO2Q2UOQ2UO[UO!22Q*UO2Q2UO]2UO!2oUOUO2U[U2PQ2PPP2P!)%fhCK79h)%fhP!9h)rgrrv�rbzseek() to file's start failediz"seek() to absolute position failed�z+seek() to negative relative position failedz+seek() to positive relative position failed:ii
Nzread() after seek failedzseek() to file's end failedrz0read() at file's end did not return empty stringz$relative seek() to file's end failed�zreadlines() after seek failedztell() after readline() failedz)tell() after seek() and readline() failedzread() after readline() failedi���)rWryrzr,r{r|r}rkrirj�seekrl�tellrnr~rm�readline)	r!rrrrq�text�s�s1�s2�lines	&        r�test_fileobj_seek�UstarReadTest.test_fileobj_seek�s���������'� &�	�	(�
�"�'�'�,�,�w��8�$�
?�
?�4��9�9�;�D�@��(�(�$�$�_�5��
�X�X�
!�
!�'�
*�
*�d��9�9�;�D��I�I�a�L����Q��	�	��8�
:��I�I�d�A�����T�4�9�9�;�=�
?��I�I�e�Q�����T�4�9�9�;�F�
H��I�I�d�A�����T�4�9�9�;�F�
H��	�	�"�
�A����Q��Y��3�
5��I�I�a��O����W�\�\�4�9�9�;�6�
8����T�Y�Y�[�#�K�
M��I�I�w�|�|�m�Q�'����Q��	�	��?�
A��I�I�c�N����!�B��I�I�c�N����!�B����R�8�
:��I�I�a�L����S�����1�4�9�9�;�9�
;��I�I�c�N����S�����1�C�7�����D�
F��I�I�a�L��=�=�?�D����T�Y�Y�[�$�s�4�y�z�*:�9�
;�O+�
*�	@�
?�
?��+�
*�
*�s%�N�1KN-�N*	�"N*	�-N>	�6N>	c��UOOQ29^tt^2o[OU2oUO	2OQ2oUO
[U2[2UO]d2PPP2P![cSOQ2K(h9h)%fhP!9h)rgrSzseeking failed in text mode)rWrjr*rrk�encoderlrror��AttributeError�fail�r!rrrs&  r�test_fileobj_text�UstarReadTest.test_fileobj_text�s���
�X�X�
!�
!�/�
2�
2�d��#�#�D�)�D��9�9�;�%�%�k�2�D����Y�t�_�n�=�
9��	�	�#��3�
2��"�
9��	�	�7�8�
9��
3�
2�
2�s6�AB8�;B�	B5� B5�2B8�4B5�5B8�8C		�C		c	�R�UOOU29^tt^2oUOOU29^tt^2oUOUOUO2PPP2PPP2P!)%fhK9h)%fhP!9hr
)rWrjrl�name)r!�lnktype�regtype�a�bs&&&  r�_test_fileobj_link� UstarReadTest._test_fileobj_link�sh��
�X�X�
!�
!�'�
*�
*�a�
�X�X�
!�
!�'�
*�
*�a����Q�V�V�Q�V�V�,�+�+�
*�
*�
*��+�
*�
*�s/�$B�	'B	�0B�B
�B
�
B�B&	�B&	c�,�UOQQ2P!)�
ustar/lnktyperg�r�r s&r�test_fileobj_link1� UstarReadTest.test_fileobj_link1���������Arc�,�UOQQ2P!)�./ustar/linktest2/lnktype�ustar/linktest1/regtyper�r s&r�test_fileobj_link2� UstarReadTest.test_fileobj_link2������� ;� 9�	;rc�,�UOQQ2P!)�
ustar/symtypergr�r s&r�test_fileobj_symlink1�#UstarReadTest.test_fileobj_symlink1�r�rc�,�UOQQ2P!)�./ustar/linktest2/symtyper�r�r s&r�test_fileobj_symlink2�#UstarReadTest.test_fileobj_symlink2�r�rc�,�UOQQ2P!)�symtype2rgr�r s&r�test_issue14160�UstarReadTest.test_issue14160�s�����
�O�<rc�L�UOQ2UOQ2P!)�bar�eaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)�add_dir_and_getmemberr s&r�test_add_dir_getmember�$UstarReadTest.test_add_dir_getmember�s���"�"�5�)��"�"�7�+r�getuid�getgidz'Missing getuid or getgid implementationc���Qo[O29^tt^2[O[Q29^tt^2o[O
Um[OU2UOVQ5[OU2PPP2[O[29^tt^2oUOUOU2UOUQ*22PPP2PPP2P![OS2h9h)%fhK�9h)%fhKH9h)%fhP!9h)c�$�]d9UmUmU!)�d)�uid�gid�rqs&rrw�3UstarReadTest.add_dir_and_getmember.<locals>.filters��(+�+�G�K�'�+��Nr�wrv�/)
r�temp_cwdr-r,�tmpname�USTAR_FORMAT�formatr{�mkdir�add�rmdirrlri)r!r�rwrWs&&  rr��#UstarReadTest.add_dir_and_getmembers���	��
�
�
!�
!����g�s�+�+�s�$�1�1��
�#��H�H�T�N��G�G�D�G�0��H�H�T�N�
,����g�&�&�#�� � ��M�M�$�'��M�M�$��*�-��'�"�
!���H�H�T�N��
,�+��'�&��"�
!�
!�se�$E�D+	�(D�D+	�*E�8D>	�>E�D(�(D+	�+D;
�4D;
�6E�>E
�E
�	E�E"	�E"	r$)r%r&r'r(rsr�r�r�r�r�r�r�r�r�r�r��unittest�
skipUnless�hasattrr{r�r1r2r3s@rreres�����6�2�$1�/;�b
9�-�
B�;�B�;�=�,�
�����X�.�H�H�7�2�x�3H�B�D��D�rrec��\sQsQsQsP!)�GzipUstarReadTest�r$�r%r&r'r(r1r$rrr�r����rr�c��\sQsQsQsP!)�Bz2UstarReadTest�r$r�r$rrr�r�r�rr�c��\sQsQsQsP!)�LzmaUstarReadTest�r$r�r$rrr�r�r�rr�c��\sQsQsQsP!)�ZstdUstarReadTest�r$r�r$rrr�r�r�rr�c�:`�\sQsQsnQsQsQsQsQsUs	P!)�ListTest�"c�j�[OUOUOQ5UmP!)�r"rVr s&rrX�ListTest.setUp%s���<�<����4�9�9�=��rc��`�[O[O2QQQ5o[O[
QU29^tt^2ROOP
Q5PPP2UO2O2oROQU2ROQU2ROQU2ROQU2ROQU2ROQ	U2ROQ
U2ROQU2U1QkoROUQ
2U2ROUQ2U2ROUQ2U2ROUQ2U2ROUQ2U2ROUQ2ROQU2ROQU2P!)%fhCKu9h)�ascii�
��newline�stdout��verbose�ustar/conttype�
ustar/regtypes
ustar/lnktypes./ustar/linktest2/symtypes./ustar/linktest2/lnktypesustar/dirtype/sustar/dirtype-with-size/c�v:�UOROOQ2oUOQQ2!)�surrogateescaper��backslashreplace)�decoderWrUr�)r�r�r!s& �r�conv� ListTest.test_list.<locals>.conv7s0���������*�*�,=�>�A��8�8�G�%7�8�8rsustar/umlauts-�����s'misc/regtype-hpux-signed-chksum-�����s)misc/regtype-old-v7-signed-chksum-�����spax/bad-pax-�spax/hdrcharset-�s)ustar/conttype ?\r?\nustar/regtype ?\r?\nslink tos->sustar/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/1234567/longname)
r*r�BytesIOr�	swap_attr�sysrWr��detach�getvalue�assertIn�assertRegex�assertNotIn)r!�tio�outr�sf   r�	test_list�ListTest.test_list(s�������r�z�z�|�W�d�C��
�
�
�s�H�c�
2�
2��H�H�M�M�%�M�(�3��j�j�l�#�#�%���
�
�'��-��
�
�&��,��
�
�&��,��
�
�B�C�H��
�
�2�C�8��
�
�2�C�8��
�
�'��-��
�
�1�3�7�	9�	
�
�
�d�H�I�3�O��
�
�d�;�<�=@�	B��
�
�d�;�<�=@�	B��
�
�d�6�7��=��
�
�d�9�:�C�@�	
����7�	8�	
����S�)������$�C3�
2�
2�s�G�G-	�%G-	c��[O[O2QQQ5o[O[
QU29^tt^2UOOP	Q5PPP2UO2O2oQoSOSQOSTTTt,tFDvqEoUQVV1*Q**MJ 	tooo22UOQU2UOQ	U2UOQ
U2UOQU2UOQ
U2P!)%fhK�9httoooh)r�r�r�r�r�rs%s tarfile/tarfile\s+%s s;\d{4}-\d\d-\d\d\s+\d\d:\d\d:\d\d ustar/\w+type[/>\sa-z-]*\nsustar/symtype -> regtypes1./ustar/linktest2/symtype -> ../linktest1/regtypes;./ustar/linktest2/lnktype link to ./ustar/linktest1/regtype)	)�\?�	rw-r--r--�7011)�-r
r)�d�	rwxr-xr-x�0)rrs255)rr
r)�ls	rwxrwxrwxr)�bs	rw-rw----s3,0)�cs	rw-rw-rw-s1,3)�pr
rs	gnu/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/longlink link to gnu/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/longnames	pax/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/longlink link to pax/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/longname)
r*rr�rrrrWr�rrrr}r)r!rr�type_perm_lengths�tp�perm�lns&      r�test_list_verbose�ListTest.test_list_verboseMs1�����r�z�z�|�W�d�C��
�
�
�s�H�c�
2�
2��H�H�M�M�$�M�'�3��j�j�l�#�#�%��(��	
����c�h�h�"�
#�"�:F��2��0�D�:�=�3�3�4�4�"�
#�$�	%�	
�
�
�1�3�7��
�
�J�C�P��
�
�3�47�	9��
�
�5�69�	;��
�
�5�69�	;�?3�
2��(
#s�E�3&E�E	�E	c���[O[O2QQQ5oQo[O[
QU29^tt^2UOOP
UUO2Q5PPP2UO2O2oUOQU2UOQU2P!)%fhKT9h)r�r�r�c3�p �UO2FDoQUO7fJUw�	J	P!3h)�reg)�
getmembersr�)rWrqs& r�members�+ListTest.test_list_members.<locals>.membersss'����>�>�+���G�L�L�(�!�M�,�s�$6�6r�)r�r!r�r�)r*rr�rrrrWr�rrrr)r!rr!rs&   r�test_list_members�ListTest.test_list_membersqs������r�z�z�|�W�d�C��	"��
�
�s�H�c�
2�
2��H�H�M�M�%�����1B�M�C�3��j�j�l�#�#�%���
�
�&��,����*�C�0�	3�
2�s�.C�C	�C	r^)
r%r&r'r(rXr	rr#r1r2r3s@rr�r�"s ����>�#%�J";�H
1�
1rr�c��\sQsQsQsP!)�GzipListTest�~r$r�r$rrr&r&~r�rr&c��\sQsQsQsP!)�Bz2ListTest�r$r�r$rrr)r)�r�rr)c��\sQsQsQsP!)�LzmaListTest�r$r�r$rrr,r,�r�rr,c��\sQsQsQsP!)�ZstdListTest�r$r�r$rrr/r/�r�rr/c�^`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsUsP!)
�CommonReadTest�c�b�[[Q29^tt^2PPP2UO[O[22UO[O[
O[222[[Q29^tt^2oUO[OU22PPP2UO[O[OQ222P!)%fhK�9h)%fhK^9h)�wbr�sinvalid)	r,r��assertFalser-�
is_tarfiler�FakePathr*r��r!rrs& r�test_is_tarfile_erroneous�(CommonReadTest.test_is_tarfile_erroneous�s���
�'�4�
 �
 ��!�	
����+�+�G�4�5�	
����+�+�I�,>�,>�w�,G�H�I��'�4�
 �
 �D����W�/�/��5�6�!�	
����+�+�B�J�J�z�,B�C�D�!�
 ��!�
 �s#�D�"&D�D	�D	�D.	�'D.	c
��UO[OUO22UO[O[O
UO222[
UOQ29^tt^2oUO[OU22PPP2[
UOQ29^tt^2oUO[O[OUO2222PPP2P!)%fhK�9h)%fhP!9h�r�)
�
assertTruer-r7r)rr8r,r*r�rkr9s& r�test_is_tarfile_valid�$CommonReadTest.test_is_tarfile_valid�s�������*�*�4�<�<�8�9�	
����*�*�9�+=�+=�d�l�l�+K�L�M��$�,�,��
%�
%���O�O�G�.�.�t�4�5�&��$�,�,��
%�
%���O�O�G�.�.�r�z�z�$�)�)�+�/F�G�H�&�
%�	&�
%��&�
%�
%�s%�&D0�AE�0E	�9E	�E	�E	c��[UOQ29^tt^2o[OU2UO	UO2]2PPP2[UOQ29^tt^2o[OUO22o[OU2UO	UO2]2PPP2P!)%fhK�9h)%fhP!9hr=)	r,r)r-r7rlr�r*r�rk)r!rr�	file_likes&  r�test_is_tarfile_keeps_position�-CommonReadTest.test_is_tarfile_keeps_position�s����$�,�,��
%�
%�����t�$����T�Y�Y�[�!�,�&��$�,�,��
%�
%���
�
�4�9�9�;�/�I����y�)����Y�^�^�-�q�1�&�
%�	&�
%��&�
%�
%�s$�7C"�=AC5�"C2	�+C2	�5D	�>D	c�
�[O[UOO	QQ229^tt^2PPP2[O[UO2oUO2UO
UO2,2WO2P!)%fhKx9h[OcSOQ2KMh9hWO2h9h)rxr�z&tarfile.open() failed on empty archive)r-r,r�r"�replace�getnames�assertListEqualr �	ReadErrorr�r[�r!rWs& r�test_empty_tarfile�!CommonReadTest.test_empty_tarfile�s���
�\�\�'�4�9�9�#4�#4�S�#�#>�
?�
?��@�	��,�,�w��	�	�2�C��L�L�N�
� � ����!1�2�6��I�I�K�@�
?��
� � �	@��I�I�>�?�	@��

�I�I�K�sA�B1�
5C�? C0�1C	�:C	�C-�C-�*C0�,C-�-C0�0Dc��UO[Q29^tt^2[OQUO2PPP2P!)%fhP!9h)�xxx)�assertRaisesRegex�FileNotFoundErrorr-r,r"r s&r�test_non_existent_tarfile�(CommonReadTest.test_non_existent_tarfile�s9���
#�
#�$5�u�
=�
=��L�L���	�	�*�>�
=�
=�
=�s�"A�A	�A	c�T�[[Q29^tt^2PPP2UO[O[O[UO
2UO[O[O[2P!)%fhK�9h�r5)r,r��assertRaisesr-rIr"r s&r�test_null_tarfile� CommonReadTest.test_null_tarfile�s`���'�4�
 �
 ��!����'�+�+�W�\�\�7�D�I�I�N����'�+�+�W�\�\�7�C�!�
 �s�B�B'	� B'	c	�x�[]2OQ2oQFD�oUO[Q29^tt^2oUO	UQ*2[
OQ2o[U2UmUO	UO22UO	U2PPP2[
O[QP	Q5oUOUO2Q,QU*2UO2J�	P!)%fhKm9hSO2h9h)	rr�r�r��foorx)r"�ignore_zerosz3ignore_zeros=True should have skipped the %r-blocks)��a)
r�	randbytesr,r��writer-�TarInformrn�tobufrHrGr[)r!r�charrrrqrWs&     r�test_ignore_zeros� CommonReadTest.test_ignore_zeros�s����a�y�"�"�3�'��!�D����7�C�(�(�D��
�
�4�$�;�'�!�/�/�%�0��"�4�y����
�
�7�=�=�?�+��
�
�4� �)��,�,�w�S�t�D�C�
��$�$�S�\�\�^�e�W�I�����	�	��!"�)�(���	�	��s�A/D	�)D'�D$
�D$
�'D9c���QFCD�o[O[Q29^tt^2o[OQ2oQUmUOU[OQ	22PPP2[[Q29^tt^2oUOU2PPP2[O[29^tt^2oUO[OQ29^tt^2SFDoJ	PPP2PPP2[O[29^tt^2oUO2oUO[OQ29^tt^2UOU[QQ5PPP2UO[OQ29^tt^2UOU2O2PPP2PPP2CJ�	P!)%fhCK�9h)%fhCKf9h)%fhCK9h)%fhCK(9h)%fhK�9h)%fhK�9h)%fhCJn9h)
r�r��w:rYzr+bzunexpected end of datarrv)r��Xr�i�saaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)r-r,r�r_rn�addfiler*r��truncaterOrI�nextryrzrjrk)r!rnrW�trrs&    r�test_premature_end_of_archive�,CommonReadTest.test_premature_end_of_archive�s���*�D����g�t�,�,���O�O�E�*��������A�r�z�z�+�6�7�-�
�g�u�%�%���
�
�d�#�&����g�&�&�#��+�+�G�,=�,=�?W�X�X� ���!�Y�'�
���g�&�&�#��H�H�J���+�+�G�,=�,=�?W�X�X��K�K��7�6�K�:�Y��+�+�G�,=�,=�?W�X�X��O�O�A�&�+�+�-�Y�
'�&�+�,�,�,��
&�%�%��Y�X�X��'�&�&��Y�X��Y�X��
'�&�&�s��AG+	�G?	�)H'	�5H
�H'	�29I!	�+H;
�0I!	�4 I
�I!	�+G<
�4G<
�?H
�H
�H$�H$�	H'	�'H8
�0H8
�;I�I�I!	�I�I�I!	�!I3
�*I3
c	�4�UO[OQ29^tt^2[O[O
QQQ529^tt^2PPP2PPP2P!)%fhK9h)%fhP!9h)�%file could not be opened successfullyz
recursion.tarrr)rOr-rIr,r�findfiler s&r�test_length_zero_header�&CommonReadTest.test_length_zero_headersa���
#�
#�G�$5�$5�7^�
_�
_����g�.�.��GX�Y�Z�Z��[�`�
_�Z�Z��`�
_�
_�s/�5B�A3	�!B�3B
�<B
�>B�B	�B	c���UOOQ2oUOOU29^tt^2oUOUOQ2UO[UO2UOUOQ2UOUO2P	2UOUO2P
2UO%c"UO[UO2L UOUO2P	2UOUOP
2PPP2UOWOP	2UOUOQ2UO[UO2UOUOQ2UOUO2P	2UOUO2P
2UO%c#UO[UO2P!UOUO2P	2P!)%fhCK9h)rgr�)rWrirjrlr�rUr��filenor"�assertIs�readable�writable�	is_stream�seekable�closed)r!�filerrs&  r�test_extractfile_attrs�%CommonReadTest.test_extractfile_attrss����x�x�!�!�/�2��
�X�X�
!�
!�$�
'�
'�4����T�Y�Y��8����n�d�k�k�:����T�Y�Y��-��M�M�$�-�-�/�4�0��M�M�$�-�-�/�5�1��~�~�~��!�!�.�$�-�-�@��
�
�d�m�m�o�t�4��M�M�$�+�+�u�-�(�	
�
�
�d�k�k�4�(�������O�4����.�$�+�+�6�������D�)��
�
�d�m�m�o�t�,��
�
�d�m�m�o�u�-��>�>�>����n�d�m�m�<��M�M�$�-�-�/�4�0�)(�
'�
'�s�B*I�+AI�I+	�#I+	r$)r%r&r'r(r:r?rCrKrQrVrbrkrpr{r1r2r3s@rr2r2�s?����E�"
I�
2��"+�D��,.�0�1�1rr2c�D``�\sQsQsnU1QksQU1QkksQsUsU9s!)�ReadSizeRecorder�)c�::�[RU_U-U@]UmP!�r)�super�__init__�
max_read_size)r!�args�kwargs�	__class__s&*,�rr��ReadSizeRecorder.__init__-s���
���$�)�&�)���rc�p:�Ud#U]6�c[UOU2Um[RU_
U2!r
)�maxr�r�rk)r!rnr�s&&�rrk�ReadSizeRecorder.read1s3�������	�!$�T�%7�%7��!>�D���w�|�D�!�!r)r�)���)	r%r&r'r(r�rkr1r2�
__classcell__)r�r4s@@rr~r~)s�����"�"rr~c�@`�\sQsQsnQsQsQsQsQsQs	Us
P!)�ExtendedHeaderMemoryTest�7c��[OQ2oVmQUmUO	[O
Q5!)�A����r�)r-r_�typernr`�
GNU_FORMAT)r!�hdrtyperqs&& r�crafted_archive�(ExtendedHeaderMemoryTest.crafted_archive>s3���/�/�#�&����!����}�}�G�$6�$6�}�7�7rc�`�[UOU22o[OUQQ59^tt^2oUO	2PPP2UO
UO[O2P!)%fhK<9h[O
cKVh9h)rQ��fileobjr")	r~r�r-r,r rI�assertLessEqualr��_EXTHEADER_READ_CHUNK)r!r�rrrWs&&  r�check�ExtendedHeaderMemoryTest.checkDs|���� 4� 4�W� =�>��	����d��6�6�#���� �7�
	
���T�/�/��1N�1N�O�7�6��� � �	��	�s:� B�B�B�B	�B	�
B�B�B-�)B-�,B-c�F�UO[O2P!r
)r�r-�GNUTYPE_LONGNAMEr s&r� test_gnu_longname_oversized_size�9ExtendedHeaderMemoryTest.test_gnu_longname_oversized_sizeN����
�
�7�+�+�,rc�F�UO[O2P!r
)r�r-�GNUTYPE_LONGLINKr s&r� test_gnu_longlink_oversized_size�9ExtendedHeaderMemoryTest.test_gnu_longlink_oversized_sizeQr�rc�F�UO[O2P!r
)r�r-�XHDTYPEr s&r�test_pax_header_oversized_size�7ExtendedHeaderMemoryTest.test_pax_header_oversized_sizeTs���
�
�7�?�?�#rr$)r%r&r'r(r�r�r�r�r�r1r2r3s@rr�r�7s$����8�P�-�-�$�$rr�c�P`�\sQsQsnP
sQsQsQsQsQs	Q"Qks
QsQ	sQ
s
QsQsQ
sQsQs\O(\\Q2Q2\O0Q22s\O4Q2s\Q2s\O4Q2sQsQs Qs!Qs"\OF\$PIQ2Q2s%Qs&Qs'Qs(\O(\\Q2Q2\O0Q22s)\O(\\Q2Q2\O0Q 22s*Q!s+Us,P!)#�MiscReadTestBaserfc
��[UOQ29^tt^2oUOUO[2[
OVOQ59^tt^2oUOUO[2UOUO[OOUO22PPP2PPP2P!)%fhK9h)%fhP!9h�r�r�)r,r)�assertIsInstancer��strr-r"rlr{r|�abspath�r!rrrWs&  r�test_no_name_argument�&MiscReadTestBase.test_no_name_argument[s���
�$�,�,��
%�
%���!�!�$�)�)�S�1����d���;�;�s��%�%�c�h�h��4�� � ����2�7�7�?�?�4�9�9�+E�F�<�&�
%�;�;��&�
%�
%�s1�A
C3�*A$C 	�C3� C0
�)C0
�+C3�3D	�<D	c�x�[UOQ29^tt^2oUO2oPPP2[OW2oUO[[UQ2[OVOQ5oUOUO2P!)%fhK�9h)r�r�r�)r,r)rkr*r�rUr��getattrr-r"�assertIsNoner��r!rrrrWs&   r�test_no_name_attribute�'MiscReadTestBase.test_no_name_attributebst��
�$�,�,��
%�
%���9�9�;�D�&��z�z�$������.�'�4��@��l�l�4�i�i�8�����#�(�(�#�&�
%�s�B)�)B9	�2B9	c��[UOQ29^tt^2oUO2oPPP2[OW2oPUm[OVOQ59^tt^2oUOUO
2PPP2P!)%fhK|9h)%fhP!9hr�)	r,r)rkr*r�r�r-r"r�r�s&   r�test_empty_name_attribute�*MiscReadTestBase.test_empty_name_attributejs~��
�$�,�,��
%�
%���9�9�;�D�&��z�z�$�����	�
�\�\�$�Y�Y�
7�
7�3����c�h�h�'�8�
7�	&�
%��8�
7�
7�s#�B%�?B8�%B5	�.B5	�8C		�C		c	���[OUO[O2o[UQ29^tt^2oUO	UO
[2[OV OQ59^tt^2oUOUO
2PPP2PPP2P!)%fhK9h)%fhP!9hr�)
r{r,r)�O_RDONLYr�r��intr-r"r�)r!�fdrrrWs&   r�test_int_name_attribute�(MiscReadTestBase.test_int_name_attributers����W�W�T�\�\�2�;�;�
/��
�"�d�^�^�t��!�!�$�)�)�S�1����d���;�;�s��!�!�#�(�(�+�<��^�;�;���^�^�s1�A
C�B=	�+C�=C

�C

�C�C!	�C!	c
�:�[OUO2o[UQ29^tt^2oUO	UO
[2[OV OQ59^tt^2oUO	UO
[2UOUO
[OOUO
22PPP2PPP2P!)%fhK9h)%fhP!9hr�)r{�fsencoder)r,r�r��bytesr-r"rlr|r�)r!r)rrrWs&   r�test_bytes_name_attribute�*MiscReadTestBase.test_bytes_name_attribute{s����+�+�d�l�l�+��
�'�4�
 �
 �D��!�!�$�)�)�U�3����d���;�;�s��%�%�c�h�h��6�� � ����2�7�7�?�?�4�9�9�+E�F�<�!�
 �;�;��!�
 �
 �s1�A
D	�A$C6	�$D	�6D
�?D
�D	�	D	�D	c��Ue
UOo[OOU2o[O
U2o[OVOQ59^tt^2oUOUOU2PPP2UOU29^tt^2oUOUOU2PPP2[OOVOQ59^tt^2oUOUOU2PPP2UOP6XcH[OUQQ59^tt^2oUOUOU2PPP2P!P!)%fhK�9h)%fhK�9h)%fhK�9h)%fhP!9h)Nr�rx)r)r{r|r�rr8r-r,r"rlr�r/r.r)r!r)�expectedrWs&&  r�test_pathlike_name�#MiscReadTestBase.test_pathlike_name�s$���?��l�l�G��7�7�?�?�7�+���$�$�W�-��
�\�\�'�	�	�
2�
2�c����S�X�X�x�0�3�
�\�\�'�
"�
"�c����S�X�X�x�0�#�
�_�_�
!�
!�'�	�	�
!�
:�
:�c����S�X�X�x�0�;��;�;�"������s�3�3�s�� � ����8�4�4�3��
3�
2��
"�
"��
:�
:��4�3�3�sH�0F�.F�F*�F=�F	�
F	�F'	� F'	�*F:	�3F:	�=G	�G	c�f�UO[OUO22P!r
)r�r{r�r)r s&r�test_pathlike_bytes_name�)MiscReadTestBase.test_pathlike_bytes_name�s��������D�L�L� 9�:rc�T�[[Q29^tt^2PPP2UO[Q29^tt^2UO	[Q2oPPP2UO[Q29^tt^2UO	[Q2oPPP2UO[Q29^tt^2UO	[P2oPPP2P!)%fhK�9h)%fhK�9h)%fhKu9h)%fhP!9h)r5z
mode must be �q�rw)r,r�rO�
ValueErrorr/rJs& r�test_illegal_mode_arg�&MiscReadTestBase.test_illegal_mode_arg�s���
�'�4�
 �
 ��!�
�
#�
#�J��
@�
@��,�,�w��,�C�A�
�
#�
#�J��
@�
@��,�,�w��-�C�A�
�
#�
#�J��
@�
@��,�,�w��+�C�A�
@�
!�
 ��
@�
@��
@�
@��
@�
@�
@�sG�C�C0�?D�<D�C-	�&C-	�0D	�9D	�D	�D	�D'	�D'	c	��[OUOUOQ5oUO	2UO	2oUO
oUOoUOU29^tt^2oUO2oPPP2UO2UOUO29^tt^2oUOU2UOUOQUQ59^tt^2oUO	2oUOUO
U2UO2UOUOU2O2WQ2PPP2PPP2P!)%fhK�9hSO2h9h)%fhKB9h)%fhP!9h)r�rQ�r"r�zseek back did not work)
r-r,r)r"rir��offsetrjrkr[r�rlr )r!rWrjr�r��frrrs&       r�test_fileobj_with_offset�)MiscReadTestBase.test_fileobj_with_offset�s>���l�l�4�<�<�d�i�i�8��	��H�H�J����
�A��6�6�D��X�X�F�����#�#�q��v�v�x��$�
�I�I�K��Y�Y�t�|�|�
$�
$���I�I�f�����$�,�,�T�4��@�@�C��H�H�J��� � �����.���� �� � �����!3�!8�!8�!:�D�0�2�
A�	%�
$�
$�#��
�I�I�K��A�@��	%�
$�
$�s[�AF�F�F�8F>�A-F+	�1F>�F	�F	�F�F(�+F;
�4F;
�6F>�>G	�G	c	�b�UO[O[O[UO
2[[Q29^tt^2oUO[O[OVO
Q5PPP2P!)%fhP!9hr�)rUr-rIr,r)r"r9s& r�test_fail_comp�MiscReadTestBase.test_fail_comp�sj�����'�+�+�W�\�\�7�D�I�I�N�
�'�4�
 �
 �D����g�/�/����&*���
�
<�!�
 �
 �
 �s�;B�B.	�&B.	c��UOOQ2oUOUO[O
Q2P!)zmisc/dirtype-old-v7zv7 dirtype failed)rWrirlr�r-�DIRTYPE�r!rqs& r�test_v7_dirtype� MiscReadTestBase.test_v7_dirtype�s6���(�(�$�$�%:�;��������w���#�	%rc��UOOQ2P![cSOQ2P!h9h)zmisc/regtype-xstarz3failed to find misc/regtype-xstar (mangled prefix?))rWri�KeyErrorr�r s&r�test_xstar_type� MiscReadTestBase.test_xstar_type�s9��	M��H�H���3�4���	M��I�I�K�L�	M�s� �	A�A�Ac�@�UOFD�oUO[UO2QQUO*2UOOQ2%fJ]UOUOQQUO*2J�	P!)鏽>zwrong mtime for %s�ustar/r-zwrong uname for %s)rWrlr��mtimer��
startswith�unamer�s& r�test_check_members�#MiscReadTestBase.test_check_members�sq���x�x�G����S����/��(�7�<�<�7�
9��<�<�*�*�8�4�4�����W�]�]�I�(�7�<�<�7�
9� rc��UOUOO2P*OQQ2P!)�zmisc/eofzcould not find all members)rlrWr r�r s&r�test_find_members�"MiscReadTestBase.test_find_members�s/��������,�,�.�r�2�7�7��,�	.r�link�Missing hardlink implementationc	��[O[]QQ59^tt^2oUOQ[QQ5UO[O[OO[Q22UOQ[QQ5UO[O[OO[Q22[[OO[Q2Q29^tt^2oUO2oPPP2UO[W2[2UOQ[QQ5UO[O[OO[Q22[[OO[Q2Q29^tt^2oUO2oPPP2UO[U2[2PPP2P!)%fhCK9h)%fhKM9h)%fhP!9h)	r�rS)�
errorlevelrUrgrrvr�r�r�)r-r,r)ryrz�
addCleanupr�unlinkr{r|r}rkrlrro)r!rWr�rs&   r�test_extract_hardlink�&MiscReadTestBase.test_extract_hardlink�sk��
�\�\�'�a�+�
F�
F�#��K�K����K�@��O�O�I�,�,�b�g�g�l�l�7�O�.T�U��K�K����K�@��O�O�I�,�,�b�g�g�l�l�7�O�.T�U��b�g�g�l�l�7�O�<�d�C�C�q��v�v�x��D����Y�t�_�n�=��K�K����K�@��O�O�I�,�,�b�g�g�l�l�7�O�.T�U��b�g�g�l�l�7�O�<�d�C�C�q��v�v�x��D����Y�t�_�n�=�G�
F�D�C�C��D�C��G�
F�
F�sO�C+I�H	�#B7I�H0	�+'I�H-
�%H-
�'	I�0I
�9I
�;I�I	�I	c���[O[QQ5o[OO[Q2o[OU2STt,tFDp3O2%fJUMJ	ooUOV$QQ5SFD�o[OOV%O2o[OQ6wcTUOUOQ*[OU2O Q*UO2Qo[OO#U2oQO%UUO&2UU2U2o	UOUO&V�2J�	UO)2[*O,U2P!ttohSO)2[*O,S2h9h)	rS�rU�
extractall�
fully_trustedrv�win32�c��[U[2%c QOVO22!QOU2!)z{} ({})z
{!r} (int))�
isinstance�floatr��hex�r�s&r�format_mtime�6MiscReadTestBase.test_extractall.<locals>.format_mtimes7��!�%��/�/�(�/�/��y�y�{�C�C�+�2�2�5�9�9rz,tar mtime {0} != file time {1} of path {2!a})r-r,r)r{r|r}rzr��isdirrr�r�platformrlr"�stat�st_mode�getmtimer�r�r[r�rmtree)
r!rW�DIRrj�directoriesrqr|r
�
file_mtime�errmsgs
&         r�test_extractall� MiscReadTestBase.test_extractall�sW���l�l�7�[�9���g�g�l�l�7�L�1��
����
�	"�&)�7�c��W�W�Y�1�1�c�K�7��N�N�3�O�N�D�&���w�w�|�|�C���6���<�<�7�*��$�$�W�\�\�E�%9�%'�W�W�T�]�%:�%:�U�%B�%,�\�\�3�:�
 �W�W�-�-�d�3�
�G�N�N� ����/� ��,����� � ����
�C�#'�&
�I�I�K����S�!��-8��*
�I�I�K����S�!�s,�G�F?�:F?�AG�B>G�?G�(G,c��[O[2Q*o[OU29^tt^2[
O[QQ59^tt^2o[OOQ[
OQ59^tt^2o[OOQ[
OQ59^tt^2o[OOQ[
OQ59^tt^2oSTt,tFDpUO2%fJUMJ	ooUOV2UO!2UO#2UO#2PPP2PPP2PPP2PPP2PPP2P!ttoh)%fhK79h)%fhKB9h)%fhKM9h)%fhKX9h)%fhP!9h)�extractall_default_filterrSrztarfile.data_filter)�wrapsztarfile.tar_filterztarfile.fully_trusted_filter)�pathlib�Pathrzr�temp_dirr-r,r)r��mock�patch�data_filter�
tar_filter�fully_trusted_filterrr�
assert_called�assert_not_called)rrW�mock_data_filter�mock_tar_filter�mock_ft_filterrjrs       r�test_extractall_default_filter�/MiscReadTestBase.test_extractall_default_filtersK���l�l�7�#�&A�A�����s�#�#��L�L��;�7�7�3��M�M��� 5�W�=P�=P��Q�Q�Ue��M�M��� 4�G�<N�<N��O�O�Sb��M�M��� >�g�Fb�Fb��c�c�gu�&)�7�c��W�W�Y�1�1�c�K�7��N�N�3�,��*�*�,��,�,�.��-�-�/�
d�
P�
R�
8�
$�#��8�
d�c��
P�O��
R�Q��
8�7��
$�#�#�s��%G4�&8G!	�8G
�8F;�F(�F#�0F#�6AF(�9F;�G
�	G!	�G4�#F(�(F8�1F8�3F;�;G�G�G
�G�G�G!	�!G1
�*G1
�,G4�4H	�=H	c���Qo[OO[Q2o[OU2[
O[QQ59^tt^2oUOU2oUOVBQQ5[OOV!2oUO[OOU2UO2[OQ6wc8UO[OU2O Q*Q2PPP2["O$U2P!)%fhK(9h["O$S2h9h)	�
ustar/dirtype�
extractdirrSrr�r|rwrr��)r{r|r}rzr�r-r,r)riryrlrr�rr
rrrr�r!�dirtyperrWrq�	extracteds&     r�test_extract_directory�'MiscReadTestBase.test_extract_directory's���!���g�g�l�l�7�L�1��
����
�		"����g��<�<���-�-��0�����G�o��F��G�G�L�L��6�	�� � ����!1�!1�)�!<�g�m�m�L��<�<�7�*��$�$�R�W�W�Y�%7�%?�%?�%�%G��O�
=�
���S�!�=�<��
���S�!�s0�$E�#BE�57E�,E�E	�E	�E�E7c���[OO[Q2o[O
U29^tt^2[O[QQ59^tt^2oSTt,tFDp3O2%fJUMJ	ooUO[OU2UQQ5SFDeo[OOVO2oUOOU2UO2Jg	PPP2PPP2P!ttoh)%fhK9h)%fhP!9h)rrSrrrv)r{r|r}rzrrr-r,r)rrr8r�rlrr�)r!rrWrjrrqr|s&      r�test_extractall_pathlike_dir�-MiscReadTestBase.test_extractall_pathlike_dir7s����g�g�l�l�7�L�1��
�
�
��
$�
$�
�\�\�'�K�
8�
8�C�&)�7�c��W�W�Y�1�1�c�K�7��N�N�9�-�-�c�2�K��N�X�&���w�w�|�|�C���6��� � ����!1�!1�$�!7����G�'�9�%�
$��7�9�
8��%�
$�
$�sI�%E�)D>	�-D9�D9�BD>	�'E�9D>	�>E
�E
�	E�E"	�E"	c
�l�Qo[OO[Q2o[O
U29^tt^2[O[QQ59^tt^2oUOU2oUOU[OU2QQ5[OOV!2oUO[OOU2UO2PPP2PPP2P!)%fhK9h)%fhP!9h)r+rrSrrr-)r{r|r}rzrrr-r,r)riryr8rlrr�r/s&     r�test_extract_pathlike_dir�*MiscReadTestBase.test_extract_pathlike_dirAs���!���g�g�l�l�7�L�1��
�
�
��
$�
$�
�\�\�'�K�
8�
8�C��m�m�G�,�G��K�K��i�&8�&8��&=�o�K�V������S�2�I����R�W�W�-�-�i�8�'�-�-�H�	9�%�
$�
8�
8��%�
$�
$�s1�%D"�+BD	�=D"�D
�D
�D"�"D3	�+D3	c�B�[OO[Q2o[	UQ29^tt^2oUOQ2PPP2[O[O2oUOU2UOQ2[ O"U2P!)%fhKo9h[Oc)SOSOO2Kgh9h[ O"S2h9h)�emptyr5rzReadError not raised)r{r|r}rzr,r^�object�__new__r-r.r�r�rIr>r�ryrr�)r!r;rrrWs&   r�test_init_close_fobj�%MiscReadTestBase.test_init_close_fobjKs��������W�g�.��
�%��
�
�$��J�J�s�O��		$��.�.����1�C�
2����U�#��	�	�0�1����U�#��
���$�$�
4������� 2� 2�3�
4��

���U�#�sG�B3�#D�9C�
D�3C	�<C	�D�&D�D�D�D�Dc	�d�[OUO29^tt^2o[V2FDYvq#UO	UO
UO
2UO	UO
2UO
22J[	PPP2P!)%fhP!9hr
)r-r,r)�ziprlr��get_info)r!rW�m1�m2s&   r�test_parallel_iteration�(MiscReadTestBase.test_parallel_iteration^sl���\�\�$�,�,�
'�
'�3��c�-���� � ����B�I�I�6�� � ��������
�>�(�(�
'�
'�
'�s�A*B�B/	�'B/	z
requires zlibc	��[OOQ29^tt^2o[OUmUO
[O29^tt^2[OUO2PPP2PPP2P!)%fhK9h)%fhP!9h)ztarfile.TarInfo.fromtarfile)r�rr�zlib�error�side_effectrUr-rIr,r))r!rs& r�test_zlib_error_does_not_leak�.MiscReadTestBase.test_zlib_error_does_not_leakfsq���]�]�
 �
 �!>�
?�
?�4�#�z�z�D���"�"�7�#4�#4�5�5����T�\�\�*�6�@�
?�5�5��@�
?�
?�s/�=B,�&!B	�B,�B)
�"B)
�$B,�,B=	�5B=	c�8�[O2o[OUQQ5oUO	2UO]2[OUQQ59^tt^2oUO
UO2P2PPP2UO]2[OUQQ59^tt^2oUO
UO2P2PPP2P!)%fhKl9h)%fhP!9h)r�r��r|rx)r*r�r-r,r[r�rlri)r!r��tfs&  r�test_next_on_empty_tarfile�+MiscReadTestBase.test_next_on_empty_tarfileos���
�Z�Z�\��
�\�\�"�3�
/��
���
�
����
�
�\�\�"�4�
0�
0�B����R�W�W�Y��-�1�	����
�
�\�\�"�3�
/�
/�2����R�W�W�Y��-�0�
/�	1�
0��0�
/�
/�s$�0!C5�
!D�5D	�>D	�D	�D	c��[OOUQ2o[OOUQ2o[OOUQ2o[UQ29^tt^2oUO	Q2PPP2[O
U2[OV$2V$1!)%fhK?9h)�target�ustarr�r5�target)r{r|r}r,r^�makedirs�symlink)r!�temp_dirpath�target_filepath�
ustar_dirpath�hardlink_filepathr�s&&    r�_setup_symlink_to_target�)MiscReadTestBase._setup_symlink_to_target|s����'�'�,�,�|�X�>�������\�7�;�
��G�G�L�L��	�B��
�/�4�
(�
(�A�
�G�G�I��)�
���M�"�
�
�
�?�6��1�1�	)�
(�s�6B?�?C	�C	c��[UQ29^tt^2oUO2oPPP2UO[W2U2P!)%fhK-9hr=)r,rkrlr)r!�filepath�digestr�rs&&&  r�_assert_on_file_content�(MiscReadTestBase._assert_on_file_content�s>��
�(�D�
!�
!�Q��6�6�8�D�"�����4��&�1�"�
!�s�A�A	�A	c
���[O29^tt^2oUOU2vq#[O[
QQ59^tt^2oUO
QUQQ5UO
QUQQ5UOU[Q22UOU[2PPP2PPP2P!)%fhK9h)%fhP!9h)�w
This test verifies that extracting a hardlink will not follow an
existing symlink after a FileExistsError on os.link.
rSrrgrrvr�rU)
rrr\r-r,r)ryrarro�r!rrYr[rWs&    r� test_extract_hardlink_on_symlink�1MiscReadTestBase.test_extract_hardlink_on_symlink�s����
�
�
!�
!�S�15�1N�1N�s�1S�.�O����g��<�<�����O�S���@����O�S���@��,�,�_�i�	�>R�S��,�,�->��O�	=�"�
!�<�<��"�
!�
!�s0�8C�AC	�1C�C
�C
�C�C'	�C'	c
��[O29^tt^2oUOU2vq#[O[
QQ59^tt^2oUO
UQQ,QQ5UOU[Q22UOU[2PPP2PPP2P!)%fhK9h)%fhP!9h)rdrSrrgr�r)r!rwrU)
rrr\r-r,r)rrarrores&    r�#test_extractall_hardlink_on_symlink�4MiscReadTestBase.test_extractall_hardlink_on_symlink�s����
�
�
!�
!�S�15�1N�1N�s�1S�.�O����g��<�<������/�?�!C�F����,�,�_�i�	�>R�S��,�,�->��O�=�"�
!�<�<��"�
!�
!�s0�8C�AB1	�C�1C
�:C
�<C�C	�
C	r$r
)-r%r&r'r(rwr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r{r�skip_unless_symlinkr��skip_unless_working_chmodr�staticmethodr(r2r5r8r>rE�skipIfrHrKrPr\rarfrir1r2r3s@rr�r�Xs������I�G�$�(�,�G�
5�;�,�2�8<�%�M�9�.������V�,�:�<��"�"�>�#�<�>�$�(�(�"�)�"�>�0��0�"�(�(�
"�)�
"�H�I�$�&?��_�_�T�T�\�?�3�+�4�+�.�2�2�
�����F��>���"�"�P�#��P������F��>���"�"�P�#��Prr�c�.`�\sQsQsnQsQsQsUsP!)�GzipReadTestBase�c�R�[UOQ29^tt^2o[UO22oPPP2W]*oUO	U]2U]*U]$QUQ$[[
Q29^tt^2oUO
U2PPP2[UO2[O[
UOQ59^tt^2PPP2P!)%fhK�9h)%fhKr9h)%fhP!9h)r�sextra:�
rsNr5r�)
r,r)�	bytearrayrkrlr�r^�printr"r-)r!r�r�flagss&   r�test_read_with_extra_field�+GzipReadTestBase.test_read_with_extra_field�s���
�$�,�,��
%�
%���Q�V�V�X�&�D�&��Q��������"��!�)��Q��&��U��
�'�4�
 �
 �A�
�G�G�D�M�!�
�d�i�i��
�\�\�'��	�	�
2�
2��3�
2�&�
%��!�
 ��3�
2�
2�s5�C/�D�#D�/C?	�8C?	�D	�D	�D&	�D&	c�X�[UOQ29^tt^2o[UO22oPPP2W]*oUO	U]2U]*U]$UO]]
2]*oQV$U#[[Q29^tt^2oUOU2PPP2[O[UOQ59^tt^2PPP2P!)%fhK�9h)%fhK]9h)%fhP!9h)r�scommentr5r�)
r,r)rtrkrl�indexr�r^r-r")r!r�rrv�is&    r�test_read_with_file_comment�,GzipReadTestBase.test_read_with_file_comment�s���
�$�,�,��
%�
%���Q�V�V�X�&�D�&��Q��������"��"�*��Q���J�J�q�"���!��"��q�	�
�'�4�
 �
 �A�
�G�G�D�M�!�
�\�\�'��	�	�
2�
2��3�
2�&�
%��!�
 ��
2�
2�
2�s5�C2�D�&D�2D	�;D	�D	�D	�D)	�!D)	r$)r%r&r'r(rwr|r1r2r3s@rrprp�s������rrpc��\sQsQsPsQsP!)�MiscReadTest��r$)r%r&r'r(r�r1r$rrrr�s���Nrrc��\sQsQsQsP!)�GzipMiscReadTest��r$r�r$rrr�r��r�rr�c��\sQsQsQsP!)�Bz2MiscReadTest��r$r�r$rrr�r��r�rr�c��\sQsQsQsP!)�LzmaMiscReadTest��r$r�r$rrr�r��r�rr�c��\sQsQsQsP!)�ZstdMiscReadTest��r$r�r$rrr�r��r�rr�c�B`�\sQsQsnQsP	sQsQsQsQs	Qs
UsP!)�StreamReadTest��rNc	�t�UOFDeoUO2%fJUOOU29^tt^2oUOQ2oW%cJPPP2Jg	P![O
cSO
Q2KAh9h)%fhJ�9h)Tr�z6simple read-through using TarFile.extractfile() failed)rW�isregrjrkr-�StreamErrorr�)r!rqrr�bufs&   r�test_read_through� StreamReadTest.test_read_through�s����x�x�G��=�=�?�?�����%�%�g�.�.�$��B�"�i�i��n���3��/�.� ��#�.�.�B��	�	�#A�B�B��	/�.�.�sB�
B&	�A:�!B&	�+B&	�:B#�B#� B&	�"B#�#B&	�&B7
�/B7
c�f�UOO2oUOOU29^tt^2oUO2oPPP2UO	[W2UOQ2UO	[U2[Q2P!)%fhKX9h)Nrh)	rWrirjrkrlrmrnrrorps&   rrs�(StreamReadTest.test_fileobj_regular_file�sw���(�(�-�-�/��
�X�X�
!�
!�'�
*�
*�d��9�9�;�D�+�����T��G�L�L�0�	2�����4��.�0�	2�	+�
*�s�B � B0	�)B0	c��UOO2oUOOU]*29^tt^2oUO[O
UO2PPP2P!)%fhP!9hr�)rWr rjrUr-r�rk)r!�tarinfosr�s&  r�test_provoke_stream_error�(StreamReadTest.test_provoke_stream_error�sX���8�8�&�&�(��
�X�X�
!�
!�(�1�+�
.�
.�!����g�1�1�1�6�6�:�/�
.�
.�
.�s�+A;�;B	�B	c���[O[QQ5oUOoUO	2oUO	2oUeL�UOUQ2UO
2%fUO2%cDUO[O29^tt^2UOU2PPP2J�UOU2oUOU2oUeJ�UOUQ2UOUO2UO2Q2CJUO2P!)%fhK�9hSO2h9h)rSrzstream.next() failed.zstream.extractfile() failedzstream extraction failed)r-r,r)rWri�assertIsNotNone�islnk�issymrUr�rjrlrkr[)r!�tar1�tar2�t1�t2�v1�v2s&      r�test_compare_members�#StreamReadTest.test_compare_members�s���|�|�G�k�:��	��8�8�D���Y�Y�[���Y�Y�[���:���$�$�R�)@�A��8�8�:�:�������*�*�7�+>�+>�?�?��(�(��,�@���%�%�b�)���%�%�b�)���:���$�$�R�)F�G�� � �����B�G�G�I�2�4�
�J�J�L�@�?��
�J�J�L�sB�0E#�(E#�9E#�'E#�6E�/E#�8AE#�E 	�E 	�E#�#E5r$)r%r&r'r(rrwr�rsr�r�r1r2r3s@rr�r��s(�����F��I�� 2�;�
�rr�c��\sQsQsQsP!)�GzipStreamReadTestir$r�r$rrr�r�r�rr�c��\sQsQsQsP!)�Bz2StreamReadTestir$r�r$rrr�r�r�rr�c��\sQsQsQsP!)�LzmaStreamReadTestir$r�r$rrr�r�r�rr�c��\sQsQsQsP!)�ZstdStreamReadTesti"r$r�r$rrr�r�"r�rr�c�(`�\sQsQsnQsQsUsP!)�TarStreamModeReadTesti%c�|�UOFDoJ	UOUOO,2P!r
)rWrlr!)r!�_s& r�test_stream_mode_no_cache�/TarStreamModeReadTest.test_stream_mode_no_cache's-�����A���������)�)�2�.rr$)r%r&r'r(r�r1r2r3s@rr�r�%s����/�/rr�c��\sQsQsQsP!)�GzipStreamModeReadTesti,r$r�r$rrr�r�,r�rr�c��\sQsQsQsP!)�Bz2StreamModeReadTesti/r$r�r$rrr�r�/r�rr�c��\sQsQsQsP!)�LzmaStreamModeReadTesti2r$r�r$rrr�r�2r�rr�c��\sQsQsQsP!)�ZstdStreamModeReadTesti5r$r�r$rrr�r�5r�rr�c�@`�\sQsQsnQsQsQsQsQsQs	Us
P!)�DetectReadTesti8c��[OV2oUO2P![OcoSO	2Po=P!Po=hh9hr
)r-r,r[rIr�)r!r�r"rW�es&&&  r�_testfunc_file�DetectReadTest._testfunc_file9sC��	��,�,�t�*�C�
�I�I�K��� � �	��I�I�K�K��	�s�+�A�A�A�Ac� �[UQ29^tt^2o[OVUQ5oPPP2WO2P!)%fhK"9h[OcoSO	2Po=P!Po=hh9h)r��r�)r,r-r[rIr�)r!r�r"r�rWr�s&&&   r�_testfunc_fileobj� DetectReadTest._testfunc_fileobjAs_��	��d�D�!�!�Q��l�l�4�q�9��"�

�I�I�K�"�!��� � �	��I�I�K�K��	�s9�A�A
�A�
A	�A	�A�B
�1B
�2B�B
c��UO%Cc_UO[O29^tt^2[O[
QUO*Q5PPP2UO[O29^tt^2[O[
QUO*Q5PPP2UO[O29^tt^2[OUO
QQ5PPP2UO[O29^tt^2[OUO
QQ5PPP2UUO
Q2UUO
QUO*2UUO
Q2UUO
QUO*2UUO
Q2P!)%fhCK�9h)%fhCKL9h)%fhCK9h)%fhK�9h)rQr�rNrxzr:*�r|*)rrUr-rIr,r))r!�testfuncs&&r�_test_modes�DetectReadTest._test_modesJsL���;�;�;��"�"�7�#4�#4�5�5����W�4�$�+�+�+=�>�6��"�"�7�#4�#4�5�5����W�4�$�+�+�+=�>�6��"�"�7�#4�#4�5�5����T�\�\��5�6��"�"�7�#4�#4�5�5����T�\�\��5�6�����s�#�����t�d�k�k�1�2�����u�%�����t�d�k�k�1�2�����u�%�6�5�5��5�5�5��5�5�5��5�5�sG�.G6�.H
�6#H�#H2�6H	�?H	�
H	�H	�H/	�'H/	�2I	�;I	c�>�UOUO2P!r
)r�r�r s&r�test_detect_file�DetectReadTest.test_detect_fileZs������,�,�-rc�>�UOUO2P!r
)r�r�r s&r�test_detect_fileobj�"DetectReadTest.test_detect_fileobj]s������/�/�0rr$)r%r&r'r(r�r�r�r�r�r1r2r3s@rr�r�8s#������&� .�1�1rr�c��\sQsQsQsP!)�GzipDetectReadTesti`r$r�r$rrr�r�`r�rr�c�(`�\sQsQsnQsQsUsP!)�Bz2DetectReadTesticc�`�[[Q29^tt^2oUO2oPPP2[O[
Q]Q59^tt^2oUO
W2PPP2UO[
Q2P!)%fhKg9h)%fhK;9h)r�r5��
compresslevelr�)r,r)rkr>r@r�r^r�r�s&  r�test_detect_stream_bz2�(Bz2DetectReadTest.test_detect_stream_bz2dso��
�'�4�
 �
 �D��9�9�;�D�!��[�[��$�a�
8�
8�D��J�J�t��9�	
���G�U�+�!�
 ��9�
8�s#�B
�B�
B	�B	�B-	�&B-	r$)r%r&r'r(r�r1r2r3s@rr�r�cs����,�,rr�c��\sQsQsQsP!)�LzmaDetectReadTestirr$r�r$rrr�r�rr�rr�c��\sQsQsQsP!)�ZstdDetectReadTestiur$r�r$rrr�r�ur�rr�c�,`�\sQsQsnQsQsQsUsP!)� GzipBrokenHeaderCorrectExceptionixz6
See: https://github.com/python/cpython/issues/107396
c���[OQ2oUO[O29^tt^2[O
UQQ5PPP2P!)%fhP!9h)s�zr|gzr�)r*r�rUr-rIr,)r!r�s& r�runTest�(GzipBrokenHeaderCorrectException.runTest|sK���J�J�
�
���
�
�w�0�0�
1�
1��L�L���0�2�
1�
1�
1�s�A"�"A3	�+A3	r$)r%r&r'r(�__doc__r�r1r2r3s@rr�r�xs�����
1�
1rr�c�`�\sQsQsnQQksQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsUsP!)�MemberReadTesti�c
���UdhUOOU29^tt^2oUO[UO	22UQUO
*2PPP2QUQ$QUQ$]dUQ$QUO
7cQUQ	$QUQ
$UO
2FD3vqVUO[V2UQU8QUO
802J5	P!)%fhK�9h)
N�wrong sha256sum for %sr�r���r�r�zold-v7r-r��gnamezwrong value in z
 field of )rWrjrlrrkr��itemsr�)r!rq�chksumr�r��k�vs&&&,   r�_test_member�MemberReadTest._test_member�s��������%�%�g�.�.�!�� � ��1�6�6�8�!4�f�0�7�<�<�?�A�/�'��w����u�
���u�
��7�<�<�'�'�F�7�O�'�F�7�O��L�L�N�D�A����W�W�0�!�78�'�,�,�G�
I�#�/�.�s�<C!�!C1	�*C1	c�n�UOOQ2oUOUQ[Q5P!)rg�c�rnr��rWrir�ror�s& r�test_find_regtype� MemberReadTest.test_find_regtype�s+���(�(�$�$�_�5�����'��^��Drc�n�UOOQ2oUOUQ[Q5P!)zustar/conttyper�r�r�r�s& r�test_find_conttype�!MemberReadTest.test_find_conttype�s,���(�(�$�$�%5�6�����'��^��Drc�d�UOOQ2oUOU]Q5P!)r+�rn�rWrir�r�s& r�test_find_dirtype� MemberReadTest.test_find_dirtype�s)���(�(�$�$�_�5�����'���*rc�d�UOOQ2oUOU]�Q5P!)zustar/dirtype-with-sizer�r�r�s& r�test_find_dirtype_with_size�*MemberReadTest.test_find_dirtype_with_size�s*���(�(�$�$�%>�?�����'���,rc�f�UOOQ2oUOU]QQ5P!)r�rg�rn�linknamer�r�s& r�test_find_lnktype� MemberReadTest.test_find_lnktype�s+���(�(�$�$�_�5�����'��O��Drc�f�UOOQ2oUOU]QQ5P!)r�r�rr�r�s& r�test_find_symtype� MemberReadTest.test_find_symtype�s+���(�(�$�$�_�5�����'��I��>rc�h�UOOQ2oUOU]]]Q5P!)�
ustar/blktype�rn�devmajor�devminorr�r�s& r�test_find_blktype� MemberReadTest.test_find_blktype��-���(�(�$�$�_�5�����'��A���Brc�h�UOOQ2oUOU]]]Q5P!)�
ustar/chrtyper
r�r�s& r�test_find_chrtype� MemberReadTest.test_find_chrtype�rrc�d�UOOQ2oUOU]Q5P!)�ustar/fifotyper�r�r�s& r�test_find_fifotype�!MemberReadTest.test_find_fifotype�s*���(�(�$�$�%5�6�����'���*rc�n�UOOQ2oUOUQ[Q5P!)zustar/sparse�Pr��rWrir��
sha256_sparser�s& r�test_find_sparse�MemberReadTest.test_find_sparse�s+���(�(�$�$�^�4�����'��m��Drc�n�UOOQ2oUOUQ[Q5P!)�
gnu/sparserr�rr�s& r�test_find_gnusparse�"MemberReadTest.test_find_gnusparse�s+���(�(�$�$�\�2�����'��m��Drc�n�UOOQ2oUOUQ[Q5P!)�gnu/sparse-0.0rr�rr�s& r�test_find_gnusparse_00�%MemberReadTest.test_find_gnusparse_00��,���(�(�$�$�%5�6�����'��m��Drc�n�UOOQ2oUOUQ[Q5P!)�gnu/sparse-0.1rr�rr�s& r�test_find_gnusparse_01�%MemberReadTest.test_find_gnusparse_01�r)rc�n�UOOQ2oUOUQ[Q5P!)�gnu/sparse-1.0rr�rr�s& r�test_find_gnusparse_10�%MemberReadTest.test_find_gnusparse_10�r)rc�n�UOOQ2oUOUQ[Q5P!)uustar/umlauts-ÄÖÜäöüßr�r�r�r�s& r�test_find_umlauts� MemberReadTest.test_find_umlauts�s2���(�(�$�$�&D�E�����'��^��Drc�^�QoUOVOO22P!)r�austar/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/12345/1234567/longname)rrWrG)r!r�s& r�test_find_ustar_longname�'MemberReadTest.test_find_ustar_longname�s ��<���
�
�d�H�H�-�-�/�0rc�n�UOOQ2oUOUQ[Q5P!)zmisc/regtype-old-v7r�r�r�r�s& r�test_find_regtype_oldv7�&MemberReadTest.test_find_regtype_oldv7�s,���(�(�$�$�%:�;�����'��^��Drc��UOO2[OUOUO
QQ5UmUOO
Q2oUOUQ[Q5P!)rSrTupax/umlauts-ÄÖÜäöüßr�r�)	rWr[r-r,r)r"rir�ror�s& r�test_find_pax_umlauts�$MemberReadTest.test_find_pax_umlauts�s_���������<�<����4�9�9�)4�6����(�(�$�$�&D�E�����'��^��Drr^r
)r%r&r'r(r�r�r�r�rrr	rrrrr#r'r,r0r3r6r9r<r1r2r3s@rr�r��sx����I�"E�E�+�-�E�?�C�C�+�E�E�E�E�E�E�
1�E�E�Err�c�F`�\sQsQsnQsQsQsQsQsQs	Qs
UsP!)	�LongnameTesti�c��UOQ*Q*Q*oUOOU2oUOWO[OQ2P![cSO	Q2KKh9h)r��longnamezlongname not foundzread longname as dirtype��123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/)	rrWrir�r��assertNotEqualr�r-r�)r!rArqs&  r�test_read_longname�LongnameTest.test_read_longname�sp���;�;��$�|�3�j�@��	,��h�h�(�(��2�G�	
���G�L�L�'�/�/�*�	,���	,��I�I�*�+�	,�s�A,�,	B�6B�
Bc�B�UOQ*Q*Q*oUOQ*Q*Q*oUOOU2oUOWOUQ2P![cSO	Q2K=h9h)r�rA�longlinkzlonglink not foundzlinkname wrongrB)rrWrir�r�rlr)r!rArGrqs&   r�test_read_longlink�LongnameTest.test_read_longlink�s����;�;��$�|�3�j�@���;�;��$�|�3�j�@��	,��h�h�(�(��2�G�	
����)�)�8�5E�F���	,��I�I�*�+�	,�s�A?�?	B�	B�Bc��UOQ*Q*Q*oUOOU2oUOoUOOOU2[OUOOOQ22oUO[O29^tt^2[OQUQ5PPP2P!)%fhP!9h)r�rAzfoo.tar)r�r�rBi)
rrWrir�r�r�r*r�rkrUr-rIr,)r!rArqr�rrs&    r�test_truncated_longname�$LongnameTest.test_truncated_longname�s����;�;��$�|�3�j�@���(�(�$�$�X�.�������������f�%��z�z�$�(�(�*�*�/�/��8�9��
�
�
�w�0�0�
1�
1��L�L�i��6�2�
1�
1�
1�s�C2�2D	�;D	c���UOQ*Q*Q*oUOOU2Oo[	[
Q29^tt^2oUO
U2[OOUOQ2QQ2oUOUOUO2PPP2P!)%fhP!9h)r�rAr�r�rS�strictrB)rrWrir�r,r)r�r-r_�frombufrkrlr��longnametype)r!rAr�rrrqs&    r�test_header_offset�LongnameTest.test_header_offsets����;�;��$�|�3�j�@�����#�#�H�-�4�4��
�'�4�
 �
 �D��I�I�f���o�o�-�-�d�i�i��n�.9�8�E�G����W�\�\�4�+<�+<�=�	!�
 �
 �
 �s� A(C�C#	�C#	c�*�Qo[O29^tt^2[O[Q29^tt^2oUO
Um[OU2UOU2[OUOQ22PPP2[O[29^tt^2oUOUOU22UOUOUOQ222PPP2PPP2P![OSOQ22h9h)%fhK�9h)%fhKW9h)%fhP!9h)r�r�r�zfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/)rr�r-r,r�r�r{r�r�r��rstripr�ri�removesuffix)r!�longdirrWs&  r�test_longname_directory�$LongnameTest.test_longname_directorys���#��
�
�
�
!�
!����g�s�+�+�s�!�[�[��
�2��H�H�W�%��G�G�G�$��H�H�W�^�^�C�0�1�
,����g�&�&�#��$�$�S�]�]�7�%;�<��$�$�S�]�]�7�3G�3G��3L�%M�N�'�"�
!���H�H�W�^�^�C�0�1��
,�+��'�&��"�
!�
!�sf�$F�E	�'D1�?%E	�%*F�AE.	�F�1'E�E	�E+
�$E+
�&F�.E>
�7E>
�9F�F	�
F	c���[O2o[OQVOQ59^tt^2o[O
2o[OUmQUmUOU2UO2Tt-tFDpDOUOaJ	ooPPP2UO]2[OQUQ59^tt^2oUO2Tt-tFDpDOUOaJ	ooPPP2UOWW2P!ttoh)%fhK�9httoh)%fhKA9h)r�)r"r�r�rxr�zgaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbb)
r*r�r-r,r�r_�AREGTYPEr�r�rgr r�rl)r!r�rW�tirjr��actuals&      r� test_longname_file_not_directory�-LongnameTest.test_longname_file_not_directory"s����j�j�l��
�\�\�s�C���
D�
D�����"�B��&�&�B�G�2�B�G��K�K��O�03���0@�A�0@�1�������0@�H�A�
E�	�����
�\�\�s�C�
0�
0�C�.1�n�n�.>�?�.>��f�f�a�f�f�n�.>�F�?�1�	
����6�*��
B�
E�
D��@�1�
0�sI�AE�!E�6E�1E�!E�$E�E�E	�E	�E�E/	�(E/	r$)r%r&r'r(rDrHrKrQrWr]r1r2r3s@rr?r?�s*����,�G�7�	>�
O�+�+rr?c�`�\sQsQsnQs\Os\Os	Qs
QsQsQs
Qs\Q2sQ	sUsP!)
�GNUReadTesti5�gnuc��UOOU[QQ5[OO[U2o[
UQ29^tt^2oUO2oPPP2UO[W2[QU*2UO2%cF[OU2oUOUOQ*UO2P!P!)%fhK�9h)rrvr�r�r�)rWryrzr{r|r}r,rkrlrr�_fs_supports_holesr�
assertLess�	st_blocks�st_size)r!r��filenamerrrr�s&&    r�_test_sparse_file�GNUReadTest._test_sparse_fileBs���������w�v��6��7�7�<�<���.��
�(�D�
!�
!�T��9�9�;�D�"�����4��-�(�4�/�	1��"�"�$�$�����!�A��O�O�A�K�K�#�-�q�y�y�9�%�"�
!�s�C9�9D		�D		c�*�UOQ2P!)r"�rhr s&r�test_sparse_file_old� GNUReadTest.test_sparse_file_oldNs�����|�,rc�*�UOQ2P!)r&rkr s&r�test_sparse_file_00�GNUReadTest.test_sparse_file_00Q������/�0rc�*�UOQ2P!)r+rkr s&r�test_sparse_file_01�GNUReadTest.test_sparse_file_01Trqrc�*�UOQ2P!)r/rkr s&r�test_sparse_file_10�GNUReadTest.test_sparse_file_10Wrqrc��[OOQ2%c�[OO[Q2o[UQ29^tt^2oUOQ2UOQ2UO2PPP2[OU2o[OU2UOQ*UO6!P
!)%fhK^9h)�linuxzsparse-testr5ir�)ry�androidsxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)rr
r�r{r|r}rzr,r�r^rhrrr�rerf)r�rrr�s   rrc�GNUReadTest._fs_supports_holesZs����<�<�"�"�#7�8�8��7�7�<�<���7�D��d�D�!�!�T��	�	�$���
�
�;�'��
�
��	"�
����
�A����T�"��K�K�#�%��	�	�1�2��"�!�s�3C(�(C8	�1C8	r$)r%r&r'r(rr-r�rPr�r�rhrlrorsrvrmrcr1r2r3s@rr`r`5sM����
�F��+�+�L�
�
�
�F�
:�-�1�1�1����rr`c�h`�\sQsQsnQs\Os\Os	Qs
QsQsQs
UsP!)�PaxReadTestiq�paxc�D�[O[QQ5oUOQ2oUO	UO
Q2UO	UOQ2UO	UOOQ2Q2UOQ2oUO	UO
P2UO	UOQ2UO	UOOQ2Q2UOQ2oUO	UO
Q	2UO	UOQ	2UO	UOOQ2Q2UO2P!SO2h9h)
rSr�pax/regtype1rYr�zVENDOR.umlautsuÄÖÜäöüßzpax/regtype2zpax/regtype3r-)
r-r,r)rirlr�r��pax_headers�getr[�r!rWrqs&  r�test_pax_global_headers�#PaxReadTest.test_pax_global_headerswsA���l�l�7�[�9��	��m�m�N�3�G����W�]�]�E�2����W�]�]�E�2����W�0�0�4�4�5E�F�;�
=��m�m�N�3�G����W�]�]�B�/����W�]�]�E�2����W�0�0�4�4�5E�F�;�
=��m�m�N�3�G����W�]�]�I�6����W�]�]�I�6����W�0�0�4�4�5E�F�;�
=�
�I�I�K��C�I�I�K�s�EF
�
Fc��[O[QQ5oUOQ2oUO	UO
Q2UO	UO]{2UO	UO]{2UO	UOQ2UO	[UO2[2UO	[UOQ*2Q2UO	[UOQ*2Q2UO2P!SO2h9h)rSrzpax/regtype4r�g��^�A�atime�ctime)
r-r,r)rirlrnr�r�r�r�rr�r[r�s&  r�test_pax_number_fields�"PaxReadTest.test_pax_number_fields�s����l�l�7�[�9��
	��m�m�N�3�G����W�\�\�4�0����W�[�[�#�.����W�[�[�#�.����W�]�]�L�9����T�'�-�-�0�%�8����U�7�#6�#6�w�#?�@�,�O����U�7�#6�#6�w�#?�@�,�O��I�I�K��C�I�I�K�s�DD3�3Ec���Q
oQQ-oSFCD�oUOUQ59^tt^2[O[Q[OQQ5o[O
2oQUm]UmV%mUOU2UO2[[Q29^tt^2oUO2oUOQ	U2UOQ	U2oPPP2[[Q
29^tt^2oUO2UOW2PPP2UO![O"Q29^tt^2[O[QQ5PPP2PPP2CJ�	P!SO2h9h)%fhK�9h)%fhK�9h)%fhKZ9h)%fhCJ�9h)�	 foo=bar
rYr�)�headerr�rS�r�rUr~r�s11 foo=bar
r5z)method tar: ReadError\('invalid header'\)r)
r�s0 
s1 
s2 
s3 =
s4 =a
s1000000 foo=bar
s
0 foo=bar
s-12 foo=bar
s$000000000000000000000000036 foo=bar
)�subTestr-r,r��
PAX_FORMATr_r�r�r�rgr[rkrrFrhr^rOrI)r!�pax_header_replacementsr��replacementrWrjr�rs&       r�test_pax_header_bad_formats�'PaxReadTest.test_pax_header_bad_formats�sW��#
���e�n��2�K����[��1�1��l�l�7�C��8J�8J�,7�9�� ����)�A�"�A�F��A�E�$/�M��K�K��N��I�I�K��'�4�(�(�A��6�6�8�D��M�M�/�4�8��<�<���E�D�)�
�'�4�(�(�A��J�J�L��G�G�D�M�)��+�+�G�,=�,=�?k�l�l��L�L��;�?�m�+2�1�3���I�I�K��(�(��
)�(��m�l��+2�1�1�s��-G"	�:F�(G"	�95F)
�. G"	�"F<
�00G"	� G
�=G"	�F&�&G"	�)F9�2F9�4G"	�<G�G�G"	�G�G�G"	�"G4
�+G4
r$)r%r&r'r(rr-r�rPr�r�r�r�r�r1r2r3s@rr}r}qs4����
�F��?�?�L�
�
�
�F��.
�(@�(@rr}c�.`�\sQsQsnQsQsQsUsP!)�
WriteTestBasei�c��[O2o[OVOQ59^tt^2oUO[OQ22PPP2UOUOQ2UO2o=[O2UOUO2UOV1O22P!)%fhK�9h)r�rYz#external fileobjs must never closed)
r*r�r-r,r"rgr_r6ryrr�
gc_collectrl)r!rrrWrs&   r�test_fileobj_no_close�#WriteTestBase.test_fileobj_no_close�s����z�z�|��
�\�\�$�Y�Y�
7�
7�3��K�K�����.�/�8�������&K�L��}�}��������������%�����}�}��/�8�
7�s�&C,�,C<	�5C<	c	�z�[O[UO29^tt^2o[OQ2o[O
[O*
UmUOU[OQUO*22PPP2UO[Q29^tt^2oUO[UO22[O
]*2PPP2P!)%fhKw9h)%fhP!9h)rYr\r�)r-r,r�r"r_�
RECORDSIZE�	BLOCKSIZErnrgr*r�rlrmrk)r!rWrjrrs&   r�test_eof_marker�WriteTestBase.test_eof_marker�s���
�\�\�'�4�9�9�
-�
-������&�A��'�'�'�*;�*;�;�A�F��K�K��2�:�:�d�Q�V�V�m�4�5�.�
�Y�Y�w��
%�
%�����S�����-�w�/A�/A�A�/E�F�&�
%�.�
-��
&�
%�
%�s$�A8D�
?D)�D&	�D&	�)D:	�2D:	r$)r%r&r'r(r�r�r1r2r3s@rr�r��s����
0�G�Grr�c�*`�\sQsQsnQsQsQsQsQsQs	Qs
\O\
\Q	2Q
2Q2s\O"Q2s\O"Q
2sQsQsQQks\O"Q2sQsQsQsQsQsQsUsP!)�	WriteTesti�rec��Qo[O[UO2o[OU2oUOU2UO
2[O[2oUOUO2]*UQ2UO
2P!SO
2h9hSO
2h9h)�
0123456789z!failed to store 100 char filename�d0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789)	r-r,r�r"r_rgr[rlrG)r!r�rWrjs&   r�test_100_char_name�WriteTest.test_100_char_name�s���
!���l�l�7�D�I�I�.��	�����%�A��K�K��N��I�I�K��l�l�7�#��	����S�\�\�^�A�.��7�
9�
�I�I�K��
�I�I�K��
�I�I�K�s�'B6�<(C�6C�Cc���[O[UO2o[O
O
[Q2o[UQ29^tt^2oUOQ2PPP2UOU2UO2UO[O
O[2]Q2P!)%fhKg9hSO2h9h)rzr5�aaaztarfile is empty)
r-r,r�r"r{r|r}rzr^r�r[�
assertGreater�getsize)r!rWr|rrs&   r�
test_tar_size�WriteTest.test_tar_size�s����l�l�7�D�I�I�.��	��7�7�<�<���0�D��d�D�!�!�T��
�
�6�"�"��G�G�D�M��I�I�K����2�7�7�?�?�7�3�Q�"�	$�"�!��
�I�I�K�s)�8C$� C�2C$�C!	�C!	�C$�$C6c�~�[O[UO2o[O
O
[Q2o[UQ29^tt^2PPP2UOU2oUOUO]2[UQ29^tt^2oUOQ2PPP2UOU2oUOUO]2UO2P!)%fhK�9h)%fhKb9hSO2h9h�rzr5r�)
r-r,r�r"r{r|r}rz�
gettarinforlrnr^r[)r!rWr|rqrrs&    r�test_file_size�WriteTest.test_file_sizes����l�l�7�D�I�I�.��	��7�7�<�<���0�D��d�D�!�!��"��n�n�T�*�G����W�\�\�1�-��d�D�!�!�T��
�
�6�"�"��n�n�T�*�G����W�\�\�1�-��I�I�K�"�!��
"�!��

�I�I�K�sH�8D*� D�"A	D*�+D�=5D*�D	�
D	�D*�D'	� D'	�"D*�*D<c���[OO[Q2o[OU2[
O[UO2oUOU2oUOUO]2UO2[OU2P!SO2h9h[OS2h9h)�	directory)r{r|r}rzr�r-r,r�r"r�rlrnr[rr��r!r|rWrqs&   r�test_directory_size�WriteTest.test_directory_sizes����w�w�|�|�G�[�1��
�����	"��,�,�w��	�	�2�C�
��.�.��.��� � ����q�1��	�	���O�O�D�!���	�	����O�O�D�!�s#�%C�#-B9�C�9C�C�C&c��[OO[Q2o[OU2[[OOUQ2Q2O
2[[OOUQ2Q2O
2[O
[UO2o[OOQ29^tt^2oQQ,Um
UOU2PPP2,oUO2FDBoUO![OO#UO$2P*2JD	UO'U,QN2UO
2[(O*[OOUQ22[(O*[OOUQ22[(O,U2P!)%fhCK9hSO
2h9h[(O*[OOSQ22[(O*[OOSQ22[(O,S2h9h)r��1r��2z
os.listdir)r�r�r�)r{r|r}rzr�r,r[r-r�r"r�rr�return_valuer�r �append�splitr�rlrr�r�)r!r|rW�mock_listdir�paths�ms&     r�test_ordered_recursion� WriteTest.test_ordered_recursion+s����w�w�|�|�G�[�1��
������R�W�W�\�\�$��
$�c�*�0�0�2��R�W�W�\�\�$��
$�c�*�0�0�2�	"��,�,�w��	�	�2�C�	
��]�]�(�(��6�6�,�14�c�
�L�-��G�G�D�M�7������)�A��L�L������q�v�v�!6�r�!:�;�*�� � ��(?�@��	�	�����R�W�W�\�\�$��4�5����R�W�W�\�\�$��4�5��O�O�D�!�7�6�6���	�	������R�W�W�\�\�$��4�5����R�W�W�\�\�$��4�5��O�O�D�!�sD�-%I�'H/�:H�A5H/�
I�H,	�$H,	�&	H/�/I�I�BKc	��[O[UO29^tt^2o[O
O
[Q2o[UQ29^tt^2oUOQ2PPP2UO[OU22oUOU2oUOUO[2UOUOUO2UOUO ]2PPP2P!)%fhK�9h)%fhP!9hr�)r-r,r�r"r{r|r}rzr^r�rr8r�r�r�rlrn)r!rWr|rrrq�tarinfo2s&     r�test_gettarinfo_pathlike_name�'WriteTest.test_gettarinfo_pathlike_nameAs���
�\�\�'�4�9�9�
-�
-���7�7�<�<���0�D��d�D�!�!�T��
�
�6�"�"��n�n�Y�%7�%7��%=�>�G��~�~�d�+�H��!�!�'�,�,��4����W�\�\�8�=�=�9����W�\�\�1�-�.�
-�!�!��.�
-�
-�s0�9D7�(D$	�:B D7�$D4
�-D4
�/D7�7E	�E	r�r�c�x�[OO[Q2o[OO[Q2o[	UQ29^tt^2oUOQ2PPP2[OV!2[O[UO2oUOU2UOU2oUOUO]2UO2[ O"U2[ O"U2P!)%fhK�9h[c#oSOQS*2Po=K�Po=hh9hSO2h9h[ O"S2[ O"S2h9h)r��link_targetr5r��
os.link(): %s)r{r|r}rzr,r^r��PermissionError�skipTestr-r�r"r�rlrnr[rr�)r!r�rSrrr�rWrqs&      r�test_link_size�WriteTest.test_link_sizeLs%���w�w�|�|�G�V�,�������g�}�5��
�&�$�
�
�4��J�J�v�� �	/��G�G�F�!�	#��,�,�w��	�	�2�C�
����v�&��.�.��.��� � ����q�1��	�	�����V�$����T�"�# �
���	/��M�M�/�A�-�.�.��	/���	�	������V�$����T�"�sT�D3�9E�%F�6>E6�4F�3E	�<E	�	E3�E3�E.�.E3�6F�F�.F9c���[OO[Q2o[OQU2[
O[UO2oUOU2oUOUO]2UO2[OU2P!SO2h9h[OS2h9h)rWr�)r{r|r}rzrWr-r,r�r"r�rlrnr[rr�r�s&   r�test_symlink_size�WriteTest.test_symlink_sizeds����w�w�|�|�G�Y�/��
�
�
�=�$�'�	#��,�,�w��	�	�2�C�
��.�.��.��� � ����q�1��	�	�����T�"���	�	������T�"�s#�%C�$-B:�C�:C�C�C'c��[OO[Q2oQo[OUOQ[O2U2[O[UO2oUOU2oUOUOU2UO2[O U2P!SO2h9h[O S2h9h)rWzsubdir/link/targetr�)r{r|r}rzrWrF�sepr-r,r�r"r�rlrr[rr�)r!r|rSrWrqs&    r�!test_symlink_target_normalization�+WriteTest.test_symlink_target_normalizationrs����w�w�|�|�G�Y�/��%��
�
�
�6�>�>�#�r�v�v�.��5�	#��,�,�w��	�	�2�C�
��.�.��.��� � ��!1�!1�6�:��	�	�����T�"���	�	������T�"�s$�%C/�-C�1C/�C,�,C/�/Dc�b�[OO[2o[O
[UO2oUOUOUQ2UOU2UOUO2,Q2[O[29^tt^2UOU2PPP2UOUO2,Q2UO2P!)%fhKC9hSO2h9h)zarchive name must be absolutezadded the archive to itself)r{r|r�r�r-r,r"rlr�r�rGr�
change_cwdrzr[)r!�dstnamerWs&  r�
test_add_self�WriteTest.test_add_self�s����'�'�/�/�'�*���l�l�7�D�I�I�.��	����S�X�X�w�3�
5��G�G�G�����S�\�\�^�R�1�
3��%�%�g�.�.����� �/����S�\�\�^�R�1�
3�
�I�I�K�/�.��

�I�I�K�s+�A1D�<D	�)D�	D	�D	�D�D.c	��[OO[Q2o[OU2QFD8o[OOV2o[
OU2J:	Qo[O[UOQQ5oUOUQUQ5UO2UO[29^tt^2UOUQP	PU2PPP2[O[Q2oSFD;oUOUO ]{2UOUO"Q2J=	UO[%UO'22]2UO2[
O(U2P!SO2h9h)%fhK�9hSO2h9h[
O(S2h9h)	rwrYc��[OOUO2Q6XcP!]{UmQUmU!)r�rY)r{r|�basenamer�r�r�r�s&rrw�%WriteTest.test_filter.<locals>.filter�s3���7�7�#�#�G�L�L�1�U�:��!��� %��
��rrSr�	empty_dir)�arcnamerwrx)rYr��baz)r{r|r}rzr�r�create_empty_filer-r,r�r"r�r[rU�	TypeErrorrlr�r�rmr r)r!�tempdirr�rwrWrqs&     r�test_filter�WriteTest.test_filter�si���'�'�,�,�w��1��
�����	&�-���w�w�|�|�G�2���+�+�D�1�.�
��,�,�w��	�	�K�H�C�
������V��D��	�	���"�"�9�-�-������d�D�&�A�.��,�,�w��,�C�
�"�G��$�$�W�[�[�#�6��$�$�W�]�]�E�:� #�� � ��S�^�^�%5�!6��:��	�	�����W�%���	�	���.�-���	�	������W�%�s[�A)G3�'F6�;-G3�(G�>#G3�"A+G�
G3�6G�G3�G	�G	�G3�G0�0G3�3Hc��[OO[Q2oU%f[O
U2L[OU2[O[UO2oUOVAQ5UO2[O[Q2oUO2oUO2U%f[OU2L[OU2SO!UO"S9%f!UO%[O&Q22P!SO2h9hSO2h9h)rY�r�rxr�)r{r|r}rzrr�r�r-r,r�r"r�r[rir�r�rlr�rFr�)r!r|�cmp_path�dirrYrWrjs&&&&   r�_test_pathname�WriteTest._test_pathname�s����g�g�l�l�7�E�*����'�'��,��H�H�S�M��l�l�7�D�I�I�.��	��G�G�C�G�&��I�I�K��l�l�7�C�(��	����
�A��I�I�K�����S�!��O�O�C� ��������!F�!F�T�\�\�"�&�&�#�-F�G��
�I�I�K��
�I�I�K�s�E�?E/�E,�/Fc�T�[OO[Q2o[OO[Q2o[OU2[OOUQ2o[OOUQ2o[UQ29^tt^2oUO
Q2PPP2[OV42[O
UQ29^tt^2oUOUQQ5UOUQQ5PPP2[O
U]Q59^tt^2oUOUQQ	5PPP2[OU2[OU2P!)%fhK�9h)%fhK�9h[cSOQ
2Kzh9h)%fhK�9h[OS2[OS2h9h)�testsymlinksztestsymlinks.tar�sourcerWr�z
something
r��r�rr-z&extractall failed with symlinked files)r{r|r}rzr�r,r^rWr-r�r�OSErrorr�rr�r)r!r��temparchive�source_file�target_filer�rWs&      r�test_extractall_symlinks�"WriteTest.test_extractall_symlinks�sw���'�'�,�,�w��7���g�g�l�l�7�,>�?��
�����	&��'�'�,�,�w�x�8�K��'�'�,�,�w�y�9�K��k�#�&�&�!����
�&�'��J�J�{�0����k�3�/�/�3�����X��6�����Y��7�0����k�a�8�8�C�H��N�N��*9�#�;�9�
���[�)����W�%�!'�&��0�/���H��I�I�F�G�H��9�8��
���[�)����W�%�s��!AG9�5F�=G9�'F1�+(G9�G&�G�(G9�F.	�'F.	�)G9�1G	�:G	�<G9�	G#�G#� G&�"G#�#G&�&G6	�/G6	�1G9�9.H'c�P�UOQ2UO[OOQQQ22UO[OOQQQ22UO[OOQQ22UO[OOQQQ22UO[OOQQQQ22UO[OOQQQQ22UO[OOQQQQ22UO[OOQQ22UO[OOQQQ22UO[OOQQQQ22UO[OOQQQQ22UOQ[O*[O*Q*2UOQ[O*[O*QP	Q5P!)rY�.r��..)r�)r�r{r|r}r�r s&r�test_pathnames�WriteTest.test_pathnames�s������E�"����B�G�G�L�L���U�;�<����B�G�G�L�L���e�<�=����B�G�G�L�L��e�4�5����B�G�G�L�L��e�S�9�:����B�G�G�L�L��e�S�%�@�A����B�G�G�L�L��e�T�5�A�B����B�G�G�L�L��e�T�5�A�B����B�G�G�L�L��u�5�6����B�G�G�L�L��u�d�;�<����B�G�G�L�L��u�c�5�A�B����B�G�G�L�L��u�d�E�B�C����E�B�F�F�N�R�V�V�3�e�;�<����E�B�F�F�N�R�V�V�3�U���Erc��[OQ6XcUOQQ2P!UOQQ2UOQQ2P!)rzC:\foorYz/fooz///foo)rr
r�r s&r�test_abs_pathnames�WriteTest.test_abs_pathnamess>���<�<�7�"����	�5�1������.�����%�0rc�4�[O[29^tt^2[O[
UO2oUOQ2UO2[O[
Q2oSFD2oUOQ6wfJUOUOQ2J4	UO2PPP2P!SO2h9hSO2h9h)%fhP!9h)r�rx�./)rr�rzr-r,r�r"r�r[r��assertStartsWith�r!rWrjs&  r�test_cwd�WriteTest.test_cwds���
�
!�
!�'�
*�
*��,�,�w��	�	�2�C�
�������	�	���,�,�w��,�C�
��A��v�v��}��-�-�a�f�f�d�;���	�	��+�
*��
�	�	����	�	���+�
*�
*�sG�&D�C�+D�C1�! C1�D�C.�.D�1D�D�D	�D	c�`�[[[1FD�nU1QkQ[O2oU2o[
OU29^tt^2UOR29^tt^2[O[UOU[OQQ-Q5PPP2PPP2UOUO2J�	P!)%fhK99h)%fhKD9h)c�4:`�\sQsQsnP	sU1QksQsUsP!)�8WriteTest.test_open_nonwritable_fileobj.<locals>.BadFileic�@:�UO%c
P
UmRgP!�F��first)r!r�exctypes&&�rr^�>WriteTest.test_open_nonwritable_fileobj.<locals>.BadFile.write!s����z�z�z�%*��
�%�
�"rr)r%r&r'r(r	r^r1r2)r4r
s@�r�BadFilers������&�&rr�nonr;)r�r�r�)r��EOFError�RuntimeErrorr*r�r
�check_no_resource_warningrUr-r,r�r"r�r6ry)r!rr�r
s&  @r�test_open_nonwritable_fileobj�'WriteTest.test_open_nonwritable_fileobjs������,�6�G�
&�"�*�*�
&��	�A��9�9�$�?�?��!�!�'�*�*����W�d�i�i��$+�$6�$6�*/��)9�;�+�@�
���Q�X�X�&�!7�+�*��@�?�s0�C1	�3:C
�-C1	�C.�'C.�)C1	�1D
�:D
c	�Z�[O[UO29^tt^2oUO	[
2oUO
[29^tt^2UOU2PPP2PPP2P!)%fhK9h)%fhP!9hr
)	r-r,r�r"r�r)rUr�rgr�s&  r�test_missing_fileobj�WriteTest.test_missing_fileobj0sd��
�\�\�'�4�9�9�
-�
-���n�n�W�-�G��"�"�:�.�.����G�$�/�.�
-�.�.��.�
-�
-�s/�3B�"B	�4B�B
�B
�B�B*	�"B*	r$)NF)r%r&r'r(rr�r�r�r�r�r�r�r�r�r{r�rrkr�r�r�r�r�r�r�r�rrrr1r2r3s@rr�r��s�����
�F��($�� "�"�,	.������V�,�:�<�#�<�#�,�"�"�#�#�#��"�"�
#�#�
#��$"&�PH�:�"�"�&�#�&�4F�"1��"'�&%�%rr�c��\sQsQsQsP!)�
GzipWriteTesti7r$r�r$rrrr7r�rrc��\sQsQsQsP!)�Bz2WriteTesti;r$r�r$rrrr;r�rrc��\sQsQsQsP!)�
LzmaWriteTesti?r$r�r$rrrr?r�rrc��\sQsQsQsP!)�
ZstdWriteTestiBr$r�r$rrrrBr�rrc�`�\sQsQsnQsPsQs\O\	OQ6g9%c
\\Q2Q2\O\O9%f
\O Q2Q22sQ	sQ
sUsP!)�StreamWriteTestiE�w|c��[O[UO2oUO	2UO
%cpUO2o[[Q29^tt^2oUO
2oPPP2UOW2oUOUOQ2L6UO[29^tt^2oUO
2oPPP2UOWOQ2[OQ2P!)%fhK�9h)%fhKU9h)r�zfound trailing datar[zincorrect zero padding)
r-r,r�r"r[�decompressorrk�
decompressr6�unused_datarl�countr�)r!rW�decrrrs&    r�test_stream_padding�#StreamWriteTest.test_stream_paddingJs����l�l�7�D�I�I�.���	�	�������#�#�%�C��g�t�$�$���y�y�{��%��>�>�$�'�D����S�_�_�.C�D����7�#�#�t��y�y�{��$�������E�*�G�,>�,>�0�	2�%�$��
$�#�s$�1D �D3� D0	�)D0	�3E	�<E	r�umaskzMissing umask implementationz$Emscripten's/WASI's umask is a stub.c��[OO[2%c[O
[2[O]2o[O[UO2oUO2[O[2OQ*oUOUQQ2[OU2P![OS2h9h)�r�zwrong file permissions)r{r|�existsr�rr�r)r-r,r"r[rrrl)r!�original_umaskrWr"s&   r�test_file_mode�StreamWriteTest.test_file_modeZs����7�7�>�>�'�"�"����W�%����%���	%��,�,�w��	�	�2�C��I�I�K��7�7�7�#�+�+�e�3�D����T�5�*B�C��H�H�^�$��B�H�H�^�$�s
�A3C'�'C?c�(�[OO[2o[O
[2o[O[OO1FD}oUO29^tt^2UV O29^tt^2oUOUOU2PPP2[O[2PPP2J	P!)%fhK89h)%fhJ�9hr
)r{r|r�r�rr8r-r,r.r�r"rlr�r�)r!�
expected_name�tarpath�funcrWs&    rr��"StreamWriteTest.test_pathlike_nameos���������0�
��$�$�W�-���\�\�7�?�?�#7�#7�8�D�������'�9�9�-�-���$�$�S�X�X�}�=�.�� � ��)� ��9�-�-�� ���s0�D	� C-
�="D	�-C=�6C=�8D	�D
�	D
r$)r%r&r'r(rr"r'r�r�rr
r�r{rnr�
is_emscripten�is_wasir/r�r1r2r3s@rrrEs�����
�F��L�2� �������0�I�I�W�R��5I�7�9�
�_�_����0�0����.��
%�	�9�
%�*�*rrc�4`�\sQsQsnQsQsQsQsUsP!)�GzipStreamWriteTestizc���[O[UO2O	2[
O[2OQQ5oP!)zN
Ensure the source directory is not included in the tar header
per bpo-41316.
zlatin-1r)r-r,r�r"r[rr�	read_text)r!�payloads& r� test_source_directory_not_leaked�4GzipStreamWriteTest.test_source_directory_not_leaked{s;��
	���W�d�i�i�(�.�.�0��,�,�w�'�1�1�9�1�E�rc�@�[O[UO]Q5O	2UO[Q29^tt^2oUO2UO
UO]2PPP2P!)%fhP!9h)rr	rx�r-r,r�r"r[rkrlr�r9s& r�test_create_with_mtime�*GzipStreamWriteTest.test_create_with_mtime�s^�����W�d�i�i�q�1�7�7�9�
�Y�Y�w��
$�
$���I�I�K����T�Z�Z��+�%�
$�
$�
$���-B�B	�B	c���[[O22o[O[UO
2O
2[[O22oUO[Q29^tt^2oUO2SOVOt96*9%cU6*Lt2PPP2P!)%fhP!9h�rx�
r��timer-r,r�r"r[rkr>r��r!�before�afterrrs&   r�test_create_without_mtime�-GzipStreamWriteTest.test_create_without_mtime�����T�Y�Y�[�!�����W�d�i�i�(�.�.�0��D�I�I�K� ��
�Y�Y�w��
$�
$���I�I�K��O�O�F�j�j�9�9�E�9�:�%�
$�
$�
$���2C�C�C)	�!C)	r$)	r%r&r'r(r=rArKr1r2r3s@rr9r9zs����7�,�;�;rr9c�D�\sQsQs\%c
\O
LPsQsP!)�Bz2StreamWriteTesti�r$)r%r&r'r(r>�BZ2Decompressorr"r1r$rrrPrP�s��*-�3�&�&�4�LrrPc�D�\sQsQs\%c
\O
LPsQsP!)�LzmaStreamWriteTesti�r$)r%r&r'r(rF�LZMADecompressorr"r1r$rrrSrS����,0�4�(�(�d�LrrSc�D�\sQsQs\%c
\O
LPsQsP!)�ZstdStreamWriteTesti�r$)r%r&r'r(r�ZstdDecompressorr"r1r$rrrWrW�rUrrWc�8`�\sQsQsnQsQsQsQsQsUs	P!)�_CompressedWriteTesti�c�T�[O2o[O[UO
UUQ59^tt^2oUO
[OQ2[OUO22PPP2U!)%fhS!9h)r�rY)	r*r�r-r,r�r"rgr_r�)r!r�rr�tarfls&&  r�_compressed_tar�$_CompressedWriteTest._compressed_tar�sp���z�z�|��
�\�\�'�4�9�9�d�(5�7�7�:?��M�M�'�/�/�%�0�"�*�*�T�[�[�2I�J�7���7�7���s�AB�B'	�B'	c��UOU2oUOUO2Q*QU*2P!):rrsNsBZh%d1AY&SY�r]rlr�r!r�rrs&& r�_test_bz2_header�%_CompressedWriteTest._test_bz2_header�s5���#�#�M�2����������.�'�-�7�	9rc�x�UOU2oUOUO2Q*Q2P!):N�Ns�r`ras&& r�_test_gz_header�$_CompressedWriteTest._test_gz_header�s-���#�#�M�2����������,�o�>rr$sFAnd we move to Bristol where they have a special, Very Silly candidate)
r%r&r'r(r�r]rbrfr1r2r3s@rrZrZ�s ����&�F��9�
?�?rrZc�,`�\sQsQsnQsQsQsUsP!)�Bz2CompressWriteTesti�rec�n�UO]2UO]2UO]	2P!�r��rbr s&r�test_compression_levels�,Bz2CompressWriteTest.test_compression_levels��,�����a� ����a� ����a� rr$�r%r&r'r(rrmr1r2r3s@rriri�s����
�F�!�!rric�,`�\sQsQsnQsQsQsUsP!)�Bz2CompressStreamWriteTesti�r c�n�UO]2UO]2UO]	2P!rkrlr s&rrm�2Bz2CompressStreamWriteTest.test_compression_levels�rorr$rpr3s@rrrrr�s����
�F�!�!rrrc�,`�\sQsQsnQsQsQsUsP!)�GzCompressWriteTesti�rec�n�UO]2UO]2UO]	2P!rk�rfr s&rrm�+GzCompressWriteTest.test_compression_levels��,�����Q�����Q�����Q�rr$rpr3s@rrvrv�s����
�F� � rrvc�,`�\sQsQsnQsQsQsUsP!)�GzCompressStreamWriteTesti�r c�n�UO]2UO]2UO]	2P!rkrxr s&rrm�1GzCompressStreamWriteTest.test_compression_levels�rzrr$rpr3s@rr|r|�s����
�F� � rr|c�V`�\sQsQsnQs\O2Q2sQsUs	P!)�CompressLevelRaisesi�c	���]o[O2oUO[29^tt^2[O
[QV!Q5PPP2P!)%fhP!9h)�rer�)r*r�rUr�r-r,r�ras&  r�test_compresslevel_wrong_modes�2CompressLevelRaises.test_compresslevel_wrong_modes�sB���
��z�z�|��
�
�
�y�
)�
)��L�L��$��J�*�
)�
)�
)�s�A�A/	�'A/	c	�>�[O2oUO[29^tt^2[O
[QU]Q5PPP2UO[29^tt^2[O
[QU]
Q5PPP2UO[29^tt^2[O
[QU]
Q5PPP2P!)%fhK�9h)%fhKi9h)%fhP!9h)zw:bz2r�zw|bz2)r*r�rUr�r-r,r�r9s& r�test_wrong_compresslevels�-CompressLevelRaises.test_wrong_compresslevels�s����z�z�|��
�
�
�z�
*�
*��L�L��'�4�q�A�+�
�
�
�z�
*�
*��L�L��'�4�r�B�+�
�
�
�z�
*�
*��L�L��'�4�r�B�+�
*�	+�
*��
*�
*��
*�
*�
*�s5�C%�8C8�<D�%C5	�.C5	�8D	�D	�D	�D	r$)
r%r&r'r(r�r�requires_bz2r�r1r2r3s@rr�r��s*����K�
����C��Crr�c�r`�\sQsQsnQsQQksQQksQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsUsP!)�GNUWriteTesti�c�H�[U2Q*]*oUQ*!�r�)rm)r!r��blockss&& r�_length�GNUWriteTest._length�s���Q��3���"����|�rc��Qo[U2[O6�c!UQ*
oV0OU2*
oUd?[U2[O6�c!UQ*
oV0OU2*
oU!r�)rmr-�LENGTH_NAMEr��LENGTH_LINK)r!r�r�r%s&&& r�
_calc_size�GNUWriteTest._calc_size�si�����t�9�w�*�*�*��S�L�E��\�\�$�'�'�E����D�	�G�,?�,?� ?��S�L�E��\�\�$�'�'�E��rc��[OU2oU%cV#m[OUm[O
[Q2o[OUmUOU2UOV2oUOoUOVVQ2UO2[O
[2oUO2oUOUQ2UOUO UO Q2UOUOUOQ2UO2P!SO2h9hSO2h9h)r�z%GNU longname/longlink creation failedzunable to read longname member)r-r_r�LNKTYPEr�r,r�r�r�rgr�r�rlr[rir�r�)r!r�r�rqrWr�r��members&&&     r�_test�GNUWriteTest._test�s���/�/�$�'���#��"�?�?�G�L��l�l�7�C�(��	� �+�+�C�J��K�K�� �����,�B����B����R�%L�M��I�I�K��l�l�7�#��		��X�X�Z�F�� � ��4�
6����W�\�\�6�;�;�4�
6����W�-�-�v���4�
6�
�I�I�K��
�I�I�K��
�I�I�K�s�AE�A0E.�E+�.Fc�*�UOQ2P!)�longnam/�longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam�r�r s&r�test_longname_1023�GNUWriteTest.test_longname_1023s���
�
�1�2rc�*�UOQ2P!)r��longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnamer�r s&r�test_longname_1024�GNUWriteTest.test_longname_1024s���
�
�2�3rc�*�UOQ2P!)r��longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longnam/longname_r�r s&r�test_longname_1025�GNUWriteTest.test_longname_1025s���
�
�3�4rc�,�UOQQ2P!)r��longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnkr�r s&r�test_longlink_1023�GNUWriteTest.test_longlink_1023s���
�
�6�9�:rc�,�UOQQ2P!)r��longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlinkr�r s&r�test_longlink_1024�GNUWriteTest.test_longlink_1024 s���
�
�6�:�;rc�,�UOQQ2P!)r��longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlnk/longlink_r�r s&r�test_longlink_1025�GNUWriteTest.test_longlink_1025#s���
�
�6�;�<rc�,�UOQQ2P!)r�r�r�r�r s&r�test_longnamelink_1023�#GNUWriteTest.test_longnamelink_1023&s���
�
�1�1�	3rc�,�UOQQ2P!)r�r�r�r�r s&r�test_longnamelink_1024�#GNUWriteTest.test_longnamelink_1024*s���
�
�2�2�	4rc�,�UOQQ2P!)r�r�r�r�r s&r�test_longnamelink_1025�#GNUWriteTest.test_longnamelink_1025.s���
�
�3�3�	5rr$r
)r%r&r'r(r�r�r�r�r�r�r�r�r�r�r�r�r1r2r3s@rr�r��sF�������:3�4�5�;�<�=�3�4�5�5rr�c�,`�\sQsQsnQsQsQsUsP!)�DeviceHeaderTesti3rec�r�[OO[Q2o[OU2[
O[UO2o[
OQQ5o[
OQQ5o[
OUm[
OUmUOU2UOU2UO2[
O[Q2oUOQ2oUOQ2oUO2UO!UO"]2UO!UO$]2UO!UO"]2UO!UO$]2[
[Q29^tt^2oUO'2oPPP2WUO(UO*o	V�O(UO*o
[-QQ2oUO!V�*Q2UO!V�*Q	2[.O0U2P!SO2h9hSO2h9h)%fhK�9h[.O0S2h9h)
�device_header_test�my_block_device�r��my_regular_filerxr��I�Ys00000000000000s)r{r|r}rzr�r-r,r�r"r_�BLKTYPEr��REGTYPErgr[rirlrrrkr��offset_data�slicerr)r!r�rW�	input_blk�	input_reg�
output_blk�
output_reg�infiler��buf_blk�buf_reg�device_headerss&           r�*test_headers_written_only_for_device_files�;DeviceHeaderTest.test_headers_written_only_for_device_files7s����'�'�,�,�w�(<�=��
�����#	&��,�,�w��	�	�2�C�
�#�O�O�1B�C�	�#�O�O�1B�C�	�!(���	��!(���	�����I�&����I�&��	�	���,�,�w��,�C�
� �]�]�+<�=�
� �]�]�+<�=�
��	�	�����Z�0�0�!�4����Z�0�0�!�4����Z�0�0�!�4����Z�0�0�!�4��g�t�$�$���k�k�m��%��*�+�+�J�,B�,B�C�G��+�+�J�,B�,B�C�G�#�3��1�N����W�4�6F�G����W�4�j�A����W�%��3�	�	����	�	���%�$��
���W�%�s\�%J�#A:I!�+J�	"I6�+BJ�J�A5J�!I3�3J�6J�J�J	�J	�J�J6r$)r%r&r'r(rr�r1r2r3s@rr�r�3s����
�F�'&�'&rr�c�`�\sQsQsnQs\OO\Q2s	Qs
\Q2s\Q2s
QsQsQ	sQ
sQsQsQ
sUsP!)�
CreateTestiazx:�
spameggs42c�<�[O[2P!r
)rr�r�r s&rrX�CreateTest.setUpgs������!rc��[UOQ29^tt^2oUOQ2PPP2P!)%fhP!9h)r5r�)r,�	file_pathr^)�clsrrs& r�
setUpClass�CreateTest.setUpClassjs0��
�#�-�-��
&�
&�$��J�J�v��'�
&�
&�
&���<�A
	�A
	c�H�[OUO2P!r
)rr�r��r�s&r�
tearDownClass�CreateTest.tearDownClassos��������'rc���[O[UO29^tt^2oUO	UO
2PPP2UO
[29^tt^2oUO2oPPP2UO[W2]2UOQU]*2P!)%fhK|9h)%fhKY9h�Nr�)r-r,r�r"r�r�r/rGrlrmr�r!�tobj�namess&  r�test_create�CreateTest.test_createss���
�\�\�'�4�9�9�
-�
-���H�H�T�^�^�$�.��\�\�'�
"�
"�d��M�M�O�E�#�����U��Q�'��
�
�l�E�!�H�-�
.�
-��#�
"�s#�B?�0C�?C	�C	�C"	�C"	c��[O[UO29^tt^2oUO	UO
2PPP2UO
[29^tt^2[O[UO2oPPP2UO[29^tt^2oUO2oPPP2UO[W2]2UOQU]*2P!)%fhK�9h)%fhK�9h)%fhKl9hr�)
r-r,r�r"r�r�rU�FileExistsErrorr/rGrlrmrr�s&  r�test_create_existing�CreateTest.test_create_existing|s���
�\�\�'�4�9�9�
-�
-���H�H�T�^�^�$�.��
�
��
/�
/��<�<�����3�D�0��\�\�'�
"�
"�d��M�M�O�E�#�����U��Q�'��
�
�l�E�!�H�-�.�
-��0�
/��#�
"�s5�D
�0&D�;D0�
D	�D	�D-	�&D-	�0E	�9E	c��UO[Q29^tt^2oUOUO2PPP2UO[29^tt^2oUO	2oPPP2UO[
W2]2UOQU]*2P!)%fhK|9h)%fhKY9h��xr�)r/r�r�r�rGrlrmrr�s&  r�test_create_taropen�CreateTest.test_create_taropen�s���
�\�\�'�3�
'�
'�4��H�H�T�^�^�$�(��\�\�'�
"�
"�d��M�M�O�E�#�����U��Q�'��
�
�l�E�!�H�-�
(�
'��#�
"�s#�B0�!C�0C	�9C	�C	�C	c	��UO[Q29^tt^2oUOUO2PPP2UO	[
29^tt^2UO[Q29^tt^2PPP2PPP2UO[29^tt^2oUO
2oPPP2UO[W2]2UOQU]*2P!)%fhK�9h)%fhK�9h)%fhK�9h)%fhK9hr�)
r/r�r�r�rUr�rGrlrmrr�s&  r�test_create_existing_taropen�'CreateTest.test_create_existing_taropen�s���
�\�\�'�3�
'�
'�4��H�H�T�^�^�$�(��
�
��
/�
/����g�s�+�+��,�0��\�\�'�
"�
"�d��M�M�O�E�#�����U��Q�'��
�
�l�E�!�H�-�(�
'��,�+��0�
/��#�
"�sS�C>�!D$�D	�D$�/D7�>D	�D	�D!
�D!
�D$�$D4	�-D4	�7E	�E	c�\�[O[O[2UO
29^tt^2oUO
UO[2UOUO[OO[22UO[OUO22UO2oPPP2UO[!W2]2UO#QU]*2UO%[29^tt^2oUO2oPPP2UO[!U2]2UO#QU]*2P!)%fhK�9h)%fhKY9hr�)r-r,rr8r�r"r�r�r�rlr{r|r�r�r�rGrmrr/r�s&  r�test_create_pathlike_name�$CreateTest.test_create_pathlike_name�s��
�\�\�)�,�,�W�5�t�y�y�
A�
A�T��!�!�$�)�)�S�1����T�Y�Y�������(@�A��H�H�Y�'�'����7�8��M�M�O�E�	B�
	
����U��Q�'��
�
�l�E�!�H�-�
�\�\�'�
"�
"�d��M�M�O�E�#�����U��Q�'��
�
�l�E�!�H�-�B�
A��#�
"�s%�BF�9F�F	�F	�F+	�$F+	c�>�UO[O[2Q29^tt^2oUO	UO
[2UOUO
[OO[22UO[OUO22UO2oPPP2UO[W2]2UOQU]*2UO[29^tt^2oUO2oPPP2UO[U2]2UOQU]*2P!)%fhK�9h)%fhKY9hr�)r/rr8r�r�r�r�rlr{r|r�r�r�rGrmrr�s&  r�!test_create_taropen_pathlike_name�,CreateTest.test_create_taropen_pathlike_name�s��
�\�\�)�,�,�W�5�s�
;�
;�t��!�!�$�)�)�S�1����T�Y�Y�������(@�A��H�H�Y�'�'����7�8��M�M�O�E�	<�
	
����U��Q�'��
�
�l�E�!�H�-�
�\�\�'�
"�
"�d��M�M�O�E�#�����U��Q�'��
�
�l�E�!�H�-�<�
;��#�
"�s$�BE9�*F�9F		�F		�F	�F	r$)r%r&r'r(rr{r|r}rzr�rX�classmethodr�r�r�r�r�r�r�r�r1r2r3s@rr�r�asn����
�F������W�l�3�I�"������(��(�.�
.�.�.�.�.�.rr�c�4`�\sQsQsnQsQsQsQsUsP!)�GzipCreateTesti�c�Z�[O[UO]Q59^tt^2oUO	UO
2PPP2[O[Q]Q59^tt^2oPPP2P!)%fhKA9h)%fhP!9h)r�r�zr:gz�r-r,r�r"r�r��r!r�s& r�test_create_with_compresslevel�-GzipCreateTest.test_create_with_compresslevel�sc��
�\�\�'�4�9�9�A�
>�
>�$��H�H�T�^�^�$�?�
�\�\�'�6��
;�
;�t��<�
;�?�
>��
;�
;�
;��#�B�:B�B	�B	�B*	�"B*	c�@�[O[UO]Q5O	2UO[Q29^tt^2oUO2UO
UO]2PPP2P!)%fhP!9h)rr	r�r@r9s& rrA�%GzipCreateTest.test_create_with_mtime�s^�����W�d�i�i�q�1�7�7�9�
�Y�Y�w��
%�
%���I�I�K����T�Z�Z��+�&�
%�
%�
%�rCc���[[O22o[O[UO
2O
2[[O22oUO[Q29^tt^2oUO2SOVOt96*9%cU6*Lt2PPP2P!)%fhP!9hrErFrHs&   rrK�(GzipCreateTest.test_create_without_mtime�rMrNr$)	r%r&r'r(rrArKr1r2r3s@rr�r��s�����,�;�;rr�c�(`�\sQsQsnQsQsUsP!)�
Bz2CreateTesti�c�Z�[O[UO]Q59^tt^2oUO	UO
2PPP2[O[Q]Q59^tt^2oPPP2P!)%fhKA9h)%fhP!9h)r�r��r:bz2rrs& rr�,Bz2CreateTest.test_create_with_compresslevel�sc��
�\�\�'�4�9�9�A�
>�
>�$��H�H�T�^�^�$�?�
�\�\�'�7�!�
<�
<���=�
<�?�
>��
<�
<�
<�rr$)r%r&r'r(rr1r2r3s@rr
r
�s�����rr
c�(`�\sQsQsnQsQsUsP!)�LzmaCreateTesti�c���[O[UO]Q59^tt^2oUO	UO
2PPP2P!)%fhP!9h)r�)�presetrrs& r�test_create_with_preset�&LzmaCreateTest.test_create_with_preset�s:��
�\�\�'�4�9�9�Q�
7�
7�4��H�H�T�^�^�$�8�
7�
7�
7���A�A(	� A(	r$)r%r&r'r(rr1r2r3s@rrr������%�%rrc�(`�\sQsQsnQsQsUsP!)�ZstdCreateTesti�c���[O[UO]Q59^tt^2oUO	UO
2PPP2P!)%fhP!9h)r�)�levelrrs& r�test_create_with_level�%ZstdCreateTest.test_create_with_level�s:��
�\�\�'�4�9�9�A�
6�
6�$��H�H�T�^�^�$�7�
6�
6�
6�rr$)r%r&r'r(rr1r2r3s@rrr�rrrc�$�\sQsQsQsPsPsQsP!)�CreateWithXModeTesti�r�r$)r%r&r'r(rr�r�r1r$rrrr�s��
�F���#'� rrr�r�c�@`�\sQsQsnQsQsQsQsQsQs	Us
P!)�HardlinkTesti�c��[OO[Q2Um[OO[Q2Um[
UOQ29^tt^2oUOQ2PPP2[OUOUO
2[O[Q2Um
UOOUO2P!)%fhK�9h[c#oSOQS*2Po=K�Po=hh9h)rYr�r5�foor�r�)r{r|r}rzrYr�r,r^r�r�r�r-r�rWr�)r!rrr�s&  rrX�HardlinkTest.setUp�s����7�7�<�<���/����7�7�<�<���/���
�$�(�(�D�
!�
!�T��J�J�v��"�	/��G�G�D�H�H�d�h�h�'��<�<���-��������T�X�X��"�
!��
�	/��M�M�/�A�-�.�.��	/�s0�2C?�
+D�?D	�D	�	D?�D?�D:�:D?c��UOO2[OUO2[OUO
2P!r
)rWr[rr�rYr�r s&rr\�HardlinkTest.tearDown	s4��������������"�������"rc��UOOUO2oUOUO[
OQ2P!)zadd file as regular failed)rWr�rYrlr�r-r�r�s& r�test_add_twice�HardlinkTest.test_add_twice	s9���(�(�%�%�d�h�h�/��������w���,�	.rc��UOOUO2oUOUO[
OQ2P!)zadd file as hardlink failed)rWr�r�rlr�r-r�r�s& r�test_add_hardlink�HardlinkTest.test_add_hardlink	s7���(�(�%�%�d�h�h�/��������w���-�	/rc���P	UOmUOOUO2oUO	UO
[OQ2P!)Tzdereferencing hardlink failed)rW�dereferencer�r�rlr�r-r�r�s& r�test_dereference_hardlink�&HardlinkTest.test_dereference_hardlink	sC��#������(�(�%�%�d�h�h�/��������w���/�	1r)r�rYrW)r%r&r'r(rXr\r&r)r-r1r2r3s@rrr�s#����
�#�
.�/�
1�1rrc�>`�\sQsQsnQQksQsQsQsQsUs	P!)�PaxWriteTesti	c��[OU2oU%cV#m[OUm[O
[Q[OQ5oUOU2UO2[O
[2oU%c5UO2]*OoUOV%Q2L3UO2]*OoUOVQ2UO2P!SO2h9hSO2h9h)r�r�zPAX longlink creation failedzPAX longname creation failed)
r-r_rr�r�r,r�r�rgr[r rlr�)r!r�r�rqrW�l�ns&&&    rr��PaxWriteTest._test 	s����/�/�$�'���#��"�?�?�G�L��l�l�7�C��0B�0B�C��	��K�K�� ��I�I�K��l�l�7�#��	���N�N�$�Q�'�0�0��� � ��*H�I��N�N�$�Q�'�,�,��� � ��*H�I��I�I�K��
�I�I�K��
�I�I�K�s�'D$�#D9�+A'D9�$D6�9Ec
��QQQQQQQQQQ-o[O[Q[OUQ	5oUO	[O
Q22UO
2[O[Q
Q5oUOUOU2UOUO2]*OU2UOO2FDxvq4UO[U2[2UO[U2[2U[O7fJZ[OU*U2Jz	UO
2P!SO
2h9h[[ 1cSO#Q2J�h9hSO
2h9h)
rYr�r��0r�z1.23�test�äöür�)r�r�rSrz"unable to convert pax header field)r-r,r�r�rgr_r[rlr�r r��assertIsNotr�r��PAX_NUMBER_FIELDSr�r�r�)r!r�rW�key�vals&    r�test_pax_global_header�#PaxWriteTest.test_pax_global_header8	sa���u��s�������(���l�l�7�C��0B�0B�'�)��	��K�K�����/�0��I�I�K��l�l�7�[�9��
	����S�_�_�k�:����S�^�^�-�a�0�<�<�k�J��O�O�1�1�3���� � ��c��E�2�� � ��c��E�2��'�3�3�3�H��1�1�#�6�s�;�4�
�I�I�K��#
�I�I�K��&�z�2�H��	�	�"F�G�H��
�I�I�K�sB�%F�
B=G�F�-G�F�F>�(F>�:G�=F>�>G�Gc��QQQQ-o[O[Q[OQQ5o[O2oQUmQ	UmVmUOU2UO2[O[QQ5oUO2]*oUOUOU2UOUO
Q2UOUO]{2UO2P!SO2h9hSO2h9h)
r|rYr��123r�rSr�r8r�)r-r,r�r�r_r�r�r�rgr[r rl)r!r�rWrjs&   r�test_pax_extended_header�%PaxWriteTest.test_pax_extended_headerX	s����u�e�U�3���l�l�7�C��0B�0B�$/�1��	����!�A�#�A�F��A�E�'�M��K�K��N��I�I�K��l�l�7�[�9��	���� ��#�A����Q�]�]�K�8����Q�V�V�U�+����Q�U�U�C�(��I�I�K��
�I�I�K��
�I�I�K�s�:D�A+D.�D+�.Ec�n�[O2oQUmQUm]dUm]{Um]|UmUO2oUOUQQ5oUOUQ*Q2UOUQ*[2UOUQ*Q2UOUQ*]d2UOUQ*]{2UOUQ	*]|2UOUQ
[]V2*Q*[]d2*Q*[]�2*Q
*[Q2*Q*[]a2*Q*[]d2*Q*[]�2*2[O2oQUmQUmQUmQUmQUmUO2oUOUQQ5oUOUQ*Q2UOUQ*]2UOUQ*]2UOUQ*]2UOUQ	*]2UOUQ
[]V2*Q*[]d2*Q*[]�2*Q*Q*Q*[Q2*Q*[]`2*Q*[]d2*Q*[]�2*2P!)rYg�����@�@rSrr�r�r�rnr�r�s././@PaxHeaders90000000000000000000000000000002000000000000010205 xsustar00s16 mtime=1000.1
��r!s90000644000017300001740000000014400000001750006516 0ufoo㍴s90000000000000000000000000000013000000000000010207 xs15 path=foo㍴
16 uid=16777216
s$16 gid=16777217
20 size=10000000000
s21 mtime=10000000000
�sfoo?s90000644000000000000000000000000000000000000006540 0ld(	rAi)
r-r_r�r�rnr�r�rB�create_pax_headerrlr�r�r�)r!rj�infor�s&   r�test_create_pax_header�#PaxWriteTest.test_create_pax_headerq	s���
�O�O�������������������z�z�|���$�$�T�K�$�@������f��u�-����d�7�m�S�1�����g���-�����f��s�+�����e��c�*�����e��c�*�������b�	�)�\�
]��C�j�
�)�
*�+0��:�
6�#�
#�&+�3�Z�
0�39�
9�<A��9�
E�]�	
]�
�C�j�
�
*�
*�
-2�#�J�
7�	8�
�O�O�������������������z�z�|���$�$�T�K�$�@������f��{�3�����g���*�����f��q�)�����e��a�(�����e��a�(�������b�	�)�\�
]��C�j�
�)�
*�,1�#�J�
7�<�
<�8�	
8�
(�
(�
*/�s��
4�
7>�
>�
AF�b�	�
J�]�

]��C�j�
�*�
*�-2�#�J�
7�	8rr$r
)
r%r&r'r(r�r=rBrIr1r2r3s@rr0r0	s�����0�@�258�58rr0c�L`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sUsP!)
�UnicodeTesti�	c�*�UOQ2P!)rS��_test_unicode_filenamer s&r�test_iso8859_1_filename�#UnicodeTest.test_iso8859_1_filename�	s���#�#�K�0rc�*�UOQ2P!)�utf7rNr s&r�test_utf7_filename�UnicodeTest.test_utf7_filename�	s���#�#�F�+rc�*�UOQ2P!)�utf-8rNr s&r�test_utf8_filename�UnicodeTest.test_utf8_filename�	s���#�#�G�,rc���[O[QUOUQQ5oQoUO	[O
U22UO
2[O[UQ5oUOUO2]*OU2UO
2P!SO
2h9hSO
2h9h)r�rN�r�rU�errorsr8r)
r-r,r�r�rgr_r[rlr r�)r!rUrWr�s&&  rrO�"UnicodeTest._test_unicode_filename�	s����l�l�7�C����$,�X�?��	�!�D��K�K�����-�.��I�I�K��l�l�7�X�6��	����S�^�^�-�a�0�5�5�t�<��I�I�K��

�I�I�K��
�I�I�K�s�'C�1C�C�C*c�~�[O[QUOQQQ5o[O2oQUmUO
[UOU2QUmQUm	UO
[UOU2UO2P!SO2h9h)r�r�rNr[r8rY)r-r,r�r�r_r�rU�UnicodeErrorrgr�r[r�s&  r�test_unicode_filename_error�'UnicodeTest.test_unicode_filename_error�	s����l�l�7�C����$+�H�>��
	��o�o�'�G�)�G�L����l�C�K�K��A� �G�L�*�G�M����l�C�K�K��A��I�I�K��C�I�I�K�s�A,B*�*B<c���[O[QQQQ5oSFD�oUO[	UO
2[2UO[	UO2[2UO[	UO2[2UO[	UO2[2J�	UO2P!SO2h9h)rxrSrN�rUr\)r-r,r)rtr�r�r�rr�r�r[rs&  r�test_unicode_argument�!UnicodeTest.test_unicode_argument�	s����l�l�7�C�$/��B��	����
�
�d�1�6�6�l�C�0��
�
�d�1�:�:�.��4��
�
�d�1�7�7�m�S�1��
�
�d�1�7�7�m�S�1�	�
�I�I�K��C�I�I�K�s�B.C!�!C3c�L�[OQ2oQUmQUm[O[
QUOQQ5oUOU2UO2[O[
QQ5oUOQ2oUOUOQ2UOUOQ2UO[O6wcvUO2[O[
QQ5oUOQ2oUOUOQ2UOUOQ2UO2P!SO2h9hSO2h9h)rYr8r�rS)r"r�rUrr�u	���)r-r_r�r�r,r�r�rgr[rirlr�)r!rjrWs&  r�test_uname_unicode�UnicodeTest.test_uname_unicode�	s"���O�O�E�"�� ��� ����l�l�7��T�[�[�$/�1��	��K�K��N��I�I�K��l�l�7�[�9��	��
�
�e�$�A����Q�W�W�n�5����Q�W�W�n�5��{�{�g�0�0�0��	�	���l�l�7�W�=���M�M�%�(��� � ����*>�?�� � ����*>�?��I�I�K��
�I�I�K��
�I�I�K�s �E<�
A'F�5A5F�<F�F#r$)
r%r&r'r(rPrTrXrOr`rdrgr1r2r3s@rrLrL�	s-����1�,�-�
�
�
��rrLc�~`�\sQsQsn\O
sQsQsQs	Qs
QsQsQ
Qks
Q	sQ
sQ
QksQsUsP!)�UstarUnicodeTesti�	c��UOQ2UOQ[2UOQ2UOQ[2P!�r�r��e01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890ud01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567ÿue012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678ÿ��_test_ustar_namer�r s&r�test_unicode_name1�#UstarUnicodeTest.test_unicode_name1
�B�����/�0����5�z�B����?�@����@�*�Mrc�V�UOQ2UOQ[2P!�r�ud012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345ÿÿue0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456ÿÿrnr s&r�test_unicode_name2�#UstarUnicodeTest.test_unicode_name2
�"�����A�B����B�J�Orc��UOQ2UOQ[2UOQ2UOQ[2P!)r�a01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789a0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123/40123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789u012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012ÿ/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789u0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123ÿ/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789rnr s&r�test_unicode_longname1�'UstarUnicodeTest.test_unicode_longname1
sD�����N�O����N�PZ�[����P�Q����Q�S]�^rc�`�UOQ[2UOQ[2P!)r�u01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901ÿ/20123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789u01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901ÿÿ/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789rnr s&r�test_unicode_longname2�'UstarUnicodeTest.test_unicode_longname2
s&�����P�R\�]����S�U_�`rc��UOQ[2UOQ2UOQ[2P!)r�u01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901ÿÿ/20123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789u01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234/01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567ÿu01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234/012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678ÿrnr s&r�test_unicode_longname3�'UstarUnicodeTest.test_unicode_longname3
s5�����T�V`�a����^�_����_�ak�lrc�V�UOQ2UOQ[2P!)r�u01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234/012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345ÿÿu01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456ÿÿrnr s&r�test_unicode_longname4�'UstarUnicodeTest.test_unicode_longname4
s#�����`�a����a�cm�nrc��[O[QUOQQ59^tt^2o[OU2oUeUOU2LUO
V#O
U2PPP2UeW[O[QQQ59^tt^2oSFDoUOVO2L	PPP2P!P!)%fhKl9h)%fhP!9h)r�rWr�rxr)	r-r,r�r�r_rgrUrlr��r!r��excrWrjs&&&  rro�!UstarUnicodeTest._test_ustar_name 
s���
�\�\�'�3�t�{�{�W�
M�
M�QT�����%�A��{����A���!�!�#�{�{�A�6�N��;����g�s�W�=�=���A��$�$�T�6�6�2���>�=��N�
M��>�=�=�s)�C�
.C�,'C2�C/	�(C/	�2D	�;D	c��UOQ2UOQ[2UOQ2UOQ[2P!rl��_test_ustar_linkr�r s&r�test_unicode_link1�#UstarUnicodeTest.test_unicode_link1/
rrrc�V�UOQ2UOQ[2P!rtr�r s&r�test_unicode_link2�#UstarUnicodeTest.test_unicode_link25
rwrc��[O[QUOQQ59^tt^2o[OQ2oVmUeUO
U2LUOV#OU2PPP2UeW[O[QQQ59^tt^2oSFDoUOVO
2L	PPP2P!P!)%fhKl9h)%fhP!9h)r�rWr�rYrxr)	r-r,r�r�r_rrgrUrlr�s&&&  rr��!UstarUnicodeTest._test_ustar_link9
s���
�\�\�'�3�t�{�{�W�
M�
M�QT�����&�A��J��{����A���!�!�#�{�{�A�6�
N��;����g�s�W�=�=���A��$�$�T�:�:�6���>�=��N�
M��>�=�=�s)� C%�.C%�2'C8�%C5	�.C5	�8D		�D		r$r
)r%r&r'r(r-r�r�rpruryr|rr�ror�r�r�r1r2r3s@rrjrj�	sO����
�
!�
!�F�
N�P�_�a�m�
o��N�P�
�
rrjc�@`�\sQsQsn\O
sQsQsUs	P!)�GNUUnicodeTestiI
c	��QFDEvq[O[UQQ59^tt^2oUOU2oPPP2JG	P![cSOQ2K,h9h)%fhJ~9h)rWr�rcz%unable to read bad GNU tar pax header))rWupax/bad-pax-���)rSupax/bad-pax-äöü�r-r,r)rir�r��r!rUr�rWrjs&    r�test_bad_pax_header�"GNUUnicodeTest.test_bad_pax_headerM
s{��<�N�H����g��%6�8�8�;>�G��
�
�d�+�A�8�8�<�� �G��I�I�E�F�G��	8�8�8��4�A2	�A�	A/�A/�,A2	�.A/�/A2	�2B
�;B
r$)
r%r&r'r(r-r�r�r�r1r2r3s@rr�r�I
s����
�
�
�F�G�Grr�c�D`�\sQsQsn\O
sPsQsQs	Us
P!)�PAXUnicodeTesti[
c	��QFDEvq[O[UQQ59^tt^2oUOU2oPPP2JG	P![cSOQ2K,h9h)%fhJ~9h)rWr�rcz)unable to read POSIX.1-2008 binary header))rWupax/hdrcharset-���)rSupax/hdrcharset-äöür�r�s&    r�test_binary_header�!PAXUnicodeTest.test_binary_headerb
s{��?�N�H����g��%6�8�8�;>�K��
�
�d�+�A�8�8�?�� �K��I�I�I�J�K��	8�8�8�r�r$)r%r&r'r(r-r�r�r`r�r1r2r3s@rr�r�[
s$����
�
�
�F�#'��
K�
Krr�c�8`�\sQsQsnQsQQksQsQsUsP!)�AppendTestBaseio
c��[Um[OO	UO2%c#[
OUO2P!P!r
)r�r)r{r|r-rr�r s&rrX�AppendTestBase.setUpr
s7�����
�7�7�>�>�$�,�,�'�'����T�\�\�*�(rc���[O[QQ59^tt^2oUOQ2oQUmUOU29^tt^2o[OUOU29^tt^2oUO
V42PPP2PPP2PPP2P!)%fhK"9h)%fhK-9h)%fhP!9h)rSrrgrY)r-r,r)rir�rjrg)r!r"�srcrjr�rWs&&    r�_create_testtar�AppendTestBase._create_testtarw
s���
�\�\�'�K�
8�
8�C��
�
�o�.�A��A�F�����#�#�q��\�\�$�,�,��5�5���K�K��%�6�$�9�
8�6�5��$�#��9�
8�
8�sM�2C�*C	�B.
�C	�C�.B>�7B>�9C	�C
�
C
�C�C%	�C%	c��UOQUO*2UO[O[O
[Q2P!)rer�)r�rrUr-rIr,r�r s&r�test_append_compressed�%AppendTestBase.test_append_compressed
s7�����T�D�K�K�/�0����'�+�+�W�\�\�7�C�Hr)r)�re)	r%r&r'r(rXr�r�r1r2r3s@rr�r�o
s����+�
&�I�Irr�c�`�\sQsQsnPsQQksQ,P1QksQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsUsP!)�
AppendTesti�
c���[OUOQUQ59^tt^2oUO[OQ22PPP2P!)%fhP!9h)r�r�r�)r-r,r)rgr_)r!r�rWs&& r�
_add_testfile�AppendTest._add_testfile�
s?��
�\�\�$�,�,��W�
=�
=���K�K�����.�/�>�
=�
=�
=�s�&A�A.	�&A.	r�c���[OUOUQ59^tt^2oUOUO	2U2PPP2P!)%fhP!9h)r�)r-r,r)rlrG)r!r�r�rWs&&& rr��AppendTest._test�
s>��
�\�\�$�,�,��
8�
8�C����S�\�\�^�U�3�9�
8�
8�
8�s�!A�A(	� A(	c�H�UO2UO2P!r
)r�r�r s&r�test_non_existing�AppendTest.test_non_existing�
s�������
�
�rc��[OUOQ2O2UO	2UO2P!r�)r-r,r)r[r�r�r s&r�
test_empty�AppendTest.test_empty�
s2�����T�\�\�4�(�.�.�0������
�
�rc��[OQ2oUOU2UO]2UO	UQ5P!)r[r�s)r*r�r�r�r�r9s& r�test_empty_fileobj�AppendTest.test_empty_fileobj�
s7���z�z�,�'�����4� ��	�	�!���
�
�4�
� rc�V�UO2[UOQ29^tt^2oUO2oPPP2[O
W2oUO
U2UO]2UOQQ,UQ5P!)%fhK_9h)r�rYr�)r�r�)	r�r,r)rkr*r�r�r�r�r�s&  r�test_fileobj�AppendTest.test_fileobj�
su������
�$�,�,��
%�
%���9�9�;�D�&��z�z�$������4� ��	�	�!���
�
�%����
�6�&�
%�s�B�B(	�!B(	c�p�UO2UO2UOQQ,Q5P!)rYr�)r�)r�r�r�r s&r�
test_existing�AppendTest.test_existing�
s,�����������
�
�%���
�(rc���[UOQ29^tt^2oUOU2PPP2UO[O
UO2P!)%fhK<9hrT)r,r)r^rUr-rIr�)r!rrrs&& r�_test_error�AppendTest._test_error�
sK��
�$�,�,��
%�
%���J�J�t��&����'�+�+�T�-?�-?�@�&�
%�s�A&�&A6	�/A6	c�*�UOQ2P!)r�r�r s&r�	test_null�AppendTest.test_null�
s������rc�*�UOQ2P!)r[�
r�r s&r�test_incomplete�AppendTest.test_incomplete�
�������$rc�r�[OQ2O2oUOU2P!�rY�r-r_r`r��r!rs& r�test_premature_eof�AppendTest.test_premature_eof�
s'�����u�%�+�+�-������rc��[OQ2O2oUOUQ*2P!)rYr�r�r�s& r�test_trailing_garbage� AppendTest.test_trailing_garbage�
s,�����u�%�+�+�-������
�*�+rc�*�UOQ2P!)r\saaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar�r s&r�test_invalid�AppendTest.test_invalid�
r�rr$r
)r%r&r'r(r�r�r�r�r�r�r�r�r�r�r�r�r�r�r1r2r3s@rr�r��
s[����!��0�!�'�4�4���
!�7�)�A�
�%��,�%�%rr�c��\sQsQsQsP!)�GzipAppendTesti�
r$r�r$rrr�r��
r�rr�c��\sQsQsQsP!)�
Bz2AppendTesti�
r$r�r$rrr�r��
r�rr�c��\sQsQsQsP!)�LzmaAppendTesti�
r$r�r$rrr�r��
r�rr�c��\sQsQsQsP!)�ZstdAppendTesti�
r$r�r$rrr�r��
r�rr�c�4`�\sQsQsnQsQsQsQsUsP!)�
LimitsTesti�
c��[OQ2oUO[O2[OQ2oUO	[
UO[O2[OQ2oUO[O2[OQ2oUO	[
UO[O2[OQ2oUO	[
UO[O2[OQ2oQUmUO	[
UO[O2[OQ2oQUmUO	[
UO[O2P!)	r�rGr�� r�rma123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/longnamea1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/1234567/longname�123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/123/longname)r-r_r`r�rUr�rr�r�s& r�test_ustar_limits�LimitsTest.test_ustar_limits�
s4���/�/�"3�4���
�
�g�*�*�+��/�/�"9�:�����*�g�m�m�W�5I�5I�J��/�/�":�;���
�
�g�*�*�+��/�/�">�?�����*�g�m�m�W�5I�5I�J��/�/�";�<�����*�g�m�m�W�5I�5I�J��/�/�*�-��4������*�g�m�m�W�5I�5I�J��/�/�&�)�� ������*�g�m�m�W�5I�5I�Jrc��[OQ2oUO[O2[OQ2oQUmUO[O2[OQ2oQUmUO
[UO[O2P!�z123/rGr�lr�)r-r_r`r�rr�rUr�r�s& r�test_gnu_limits�LimitsTest.test_gnu_limits�
s~���/�/�";�<���
�
�g�(�(�)��/�/�*�-��4����
�
�g�(�(�)��/�/�&�)��+������*�g�m�m�W�5G�5G�Hrc�b�[OQ2oUO[O2[OQ2oQUmUO[O2[OQ2oQUmUO[O2P!r�)r-r_r`r�rr�r�s& r�test_pax_limits�LimitsTest.test_pax_limits�
sr���/�/�";�<���
�
�g�(�(�)��/�/�*�-��4����
�
�g�(�(�)��/�/�&�)��+����
�
�g�(�(�)rr$)	r%r&r'r(r�r�r�r1r2r3s@rr�r��
s����K�>I�
*�
*rr�c��`�\sQsQsnQsQsQsQsQsQs	\
O\O\\Q2Q	2\O O#Q
2Q222sQsUsP!)
�MiscTesti
c�L�UO[OQ]QQ2Q2UO[OQ]QQ2Q2UO[OQQQ2Q2UO[OQQQ2Q2P!)rYr�rNsfoo�foobarr!sfoobar)rlr-�stn�ntsr s&r�test_char_fields�MiscTest.test_char_fieldss���������U�A�w��A�)�	+�������X�q�'�8�D��	!�������%5�w��I��	 �������]�G�X�F��	 rc��UO[OQ2]2UO[OQ2Q2UO[OQ2Q2UO[OQ2Q2UO[OQ2P2UO[OQ2Q2UO[OQ	2Q
2UO[OQ
2]2UO[OQ2]2P!)�0000001�7777777��� r�������r���������������������r[s       ������)rlr-�ntir s&r�test_read_number_fields� MiscTest.test_read_number_fieldss���	
������^�4�a�8�������^�4�i�@�������%H�I�#�	%�������%H�I�#�	%�������%H�I��	�������%H�I��	�������%H�I�+�	-�	
������U�+�Q�/�������\�2�A�6rc	�(�UO[O]2Q2UO[OQ2Q2UO[OQ[OQ5Q2UO[OQ[OQ5Q2UO[OP[OQ5Q	2UO[OQ
[OQ5Q
2UO[OQ[OQ5Q2UO[OQ[OQ5Q
2UO[OQ[OQ5Q2UO[O[OQ[OQ52]2P!)r�r�r�r�r�r�r�r�r�r�r�r�s�rrgY�g0Bg��������)rlr-�itnr�rr s&r�test_write_number_fields�!MiscTest.test_write_number_fields*sa��������Q���8�������Y�/��@�������Z��8J�8J�K�<�	>�������Z��8J�8J�K�<�	>�������R��0B�0B�C�<�	>�������T�'�2D�2D�E�<�	>�������%7�,3�,>�,>�@�<�	>�	
������V�G�4F�4F�G�<�	>�������]�7�;M�;M�N�<�	>�������W�[�[��g�>P�>P�%Q�R�TU�Vrc��UO[29^tt^2[OP][O2PPP2UO[29^tt^2[OQ][O2PPP2UO[29^tt^2[OQ][O
2PPP2UO[29^tt^2[OQ][O
2PPP2P!)%fhK�9h)%fhK�9h)%fhK�9h)%fhP!9h)r�r�ll����)rUr�r-rr�r�r s&r�test_number_field_limits�!MiscTest.test_number_field_limitsAs���
�
�
�z�
*�
*��K�K��A�w�3�3�4�+�
�
�
�z�
*�
*��K�K�
�A�w�';�';�<�+�
�
�
�z�
*�
*��K�K���7�+=�+=�>�+�
�
�
�z�
*�
*��K�K�
�q�'�*<�*<�=�+�
*�
+�
*��
*�
*��
*�
*��
*�
*�
*�sG�'D4�+'E�7'E�'E-�4E	�=E	�E	�E	�E*	�#E*	�-E>	�6E>	c��.QjQjQjQjQjQjQjQjQjQ	jQ
jQjQjQ
jQjQjQjQjQjQjQjQjQjQjQjQjQjQjQjQjQjQjQ jQ!jQ"jQ#jQ$jQ%jQ&jQ'jQ(jQ)jQ*jQ+jQ,jQ-jQ.jo[OU[UQ/5P!)0�version�grp�pwd�symlink_exception�NULr�r��	GNU_MAGIC�POSIX_MAGICr�r��
LENGTH_PREFIXr�rZr��SYMTYPE�CHRTYPEr�r��FIFOTYPE�CONTTYPEr�r��GNUTYPE_SPARSEr��XGLTYPE�SOLARIS_XHDTYPE�SUPPORTED_TYPES�
REGULAR_TYPES�	GNU_TYPES�
PAX_FIELDS�PAX_NAME_FIELDSr:r�r�rr�calc_chksums�copyfileobj�filemode�EmptyHeaderError�TruncatedHeaderError�EOFHeaderError�InvalidHeaderError�SubsequentHeaderError�ExFileObject�main)�not_exported)r�check__all__r-)r!r+s& r�test__all__�MiscTest.test__all__Ks���=��=��=�#�=�%8�=�:?�=�AL�=��=�%�=�'4�=�6C�=�
�=�+�=�-6�=�8B�=�DM�=�
�	=�!�	=�#,�	=�.7�	=�9C�	=�EO�	=�

�=�
!3�=�
5E�=�
�
=�!�
=�#4�
=�6G�
=�
�=�)�=�+7�=�9J�=�
 �=�"'�=�).�=�05�=�7<�=�>L�=�
�=�&�=�(:�=�
#�=�%5�=�7K�=�
$�=�&4�=�6<�=��	���T�7��Frc	�r�[OO[OO[2QQ2oUO[O29^tt^2o[OQ21o[OOO[OQUQ59^tt^2[OU2PPP2PPP2UOQ[!WO"22P!)%fhK?9h)%fhKJ9h)rrzlzma module is not availablerH)rJz?
- method xz: CompressionError('lzma module is not available')
)r{r|r}�dirname�__file__rUr-rI�CompressionErrorr�rrr<r.r,rr��	exception)r!�fname�excinforIs&   r�.test_useful_error_message_when_modules_missing�7MiscTest.test_useful_error_message_when_modules_missingZs��������R�W�W�_�_�X�6�8I�K[�\��
�
�
�w�0�0�
1�
1�W��,�,�-K�L�M�E����$�$�+�+�G�O�O�X�SX�+�Y�Y����U�#�Z�2�
	
�
�
�O���!�!�"�	
�Z�Y��2�
1�s1�+AD&�D	�D&�D#
�D#
�D&�&D6	�/D6	�chmodzmissing os.chmod�os.chmodc��`�[OO[Q2nU1QkoV!m[OO[Q2o[29^tt^2oUO
QQQ5UO
Q[OQQ5UO
QUQ5PPP2[OU2WO2ORQQ	5[OU2[OR2P!)%fhKv9h[OS2[OR2h9h)
�
test127987c�:�[OOU2o[OOUR,2R6wc
[	QU2gP!)z8should not try to chmod anything outside the destination)r{r|�realpath�
commonpath�	Exception)r|r"r��target_pathr�s&&, �r�mock_chmod_side_effect�RMiscTest.test_deferred_directory_attributes_update.<locals>.mock_chmod_side_effectlsH����'�'�*�*�4�0�K��w�w�!�!�;��"8�9�W�D�� Z�\g�h�h�Er�outside_tree_dirr�r���
symlink_to�
?rwsrwsrwt�r�r"rWr-)r{r|r}rzrJ�ArchiveMakerr�r-r�rVr,rrr)r!�
mock_chmodrArC�arcr�s&&   @r�)test_deferred_directory_attributes_update�2MiscTest.test_deferred_directory_attributes_updatefs����
�'�'�,�,�w��5��	i�"8���7�7�<�<��1C�D��
�^�^�s��G�G�C�C�G�(��G�G�C�g�o�o�L�G�A��G�G�C�$4�G�5��
	���$�%�	&��H�H�J�!�!�w�u�!�=����-�.����W�%��^��
���-�.����W�%�s�)A	D �!D3� D0	�)D0	�3.E!r$)r%r&r'r(r�rrr
r-r6rrkr�r�r�r{rrrKr1r2r3s@rr�r�
st���� �7�(W�.>�
G�

��"�"�
�����W�-�/A�B�
�]�]����$�&�%�C�#�&rr�c�`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsQsQsUsP!)�CommandLineTesti�c��[OQQ,UN3-U@vq4oUO[OO2Q2!)�-mr-�
)r	�assert_python_okrFr{�linesepr�)r!r�r��rcr�errs&*,   r�
tarfilecmd�CommandLineTest.tarfilecmd�sJ��$�5�5�d�I�@��@�8>�@�����{�{�2�:�:�,�,�.��6�6rc�8�[OQQ,UN3!)rPr-)r	�assert_python_failure)r!r�s&*r�tarfilecmd_failure�"CommandLineTest.tarfilecmd_failure�s���2�2�4��J�T�J�Jrc
��[OQQQ5[OQQQ5,oUO[OU2[
OUQ29^tt^2oSFD3oUOU[OOU2Q5J5	PPP2P!)%fhP!9h)�tokenize_tests.txt�tokenizedatar�9tokenize_tests-no-coding-cookie-and-utf8-bom-sig-only.txtr�r�)rror�rr�r-r,r�r{r|r�)r!�tar_name�filesrO�tardatas&&   r�make_simple_tarfile�#CommandLineTest.make_simple_tarfile�s����!�!�"6�)7�9��!�!�#>�)7�9�:��
	
���	�(�(�(�3�
�\�\�(�C�
(�
(�B� �����w����(8�(8��(A��B�!�)�
(�
(�
(�s�1;B6�6C	�?C	c��UO[OU2[OUQ29^tt^2o[O
Q2oUO
U[OQ2Q5[O
Q2oUO
U[OQ2Q5PPP2P!)%fhP!9h)r��benignrr��../evil)	r�rr�r-r,r_rgr*r�)r!r`rOrf�evils&&   r�make_evil_tarfile�!CommandLineTest.make_evil_tarfile�s������	�(�(�(�3�
�\�\�(�C�
(�
(�B��_�_�X�.�F��J�J�v�r�z�z�#��J�7��?�?�9�-�D��J�J�t�R�Z�Z��_�J�5�	)�
(�
(�
(�s�A;C�C	�C	c��UO2vqoUOUQ2UOQUO22UOQUO22UOQUO22UOQP2vqoUOUQ2UO	UO2Q2P!)rsusageserrorsrequired�-l)rZrlr�lowerrC�strip)r!rTrrUs&   r�test_bad_use�CommandLineTest.test_bad_use�s����.�.�0��������c�"��
�
�h��	�	��,��
�
�h��	�	��,��
�
�k�3�9�9�;�/��.�.�t�R�8��������c�"����C�I�I�K��-rc�~�[FD0oQFD&oUOV!2oUOUQ2J(	J2	P!)�-tr)rrz--test)�testtarnamesrVrl�r!r`�optrs&   r�test_test_command�!CommandLineTest.test_test_command�s6��$��H�%���o�o�c�4��� � ��c�*�&�%rc��[FD4oQFD*oUOUQUQQ5oUOQU2J,	J6	P!)�-vrrrW��PYTHONIOENCODINGsis a tar archive.
�ryz	--verbose)rsrVrrts&   r�test_test_command_verbose�)CommandLineTest.test_test_command_verbose�sD��$��H�(���o�o�c�4��7>�&�@���
�
�4�c�:�)�%rc�b�[OQQQ5oUOQU2vq#oUOQU2UO	UQ2UO	U]2[
FD�oUO
UQ59^tt^2[UQ29^tt^2oUO2oPPP2[[Q29^tt^2oUOWQ	*2PPP2UOQ[2vq#oUO	UQ2UO	U]2[O[2PPP2J�	P!)%fhK�9h)%fhK�9h[O[2h9h)%fhCJB9h)
�
zipdir.ziprrrr� is not a tar archive.r)r`r�r5:NrN)
rrorZrrlrsr�r,rkr�r^rr�)r!�zipnamerTrrUr`r�rs&       r�test_test_command_invalid_file�.CommandLineTest.test_test_command_invalid_file�s8���"�"�<�8I�J���.�.�t�W�=�����
�
�/��5�����c�"�����Q��$��H����x��0�0��(�D�)�)�Q��6�6�8�D�*�.��g�t�,�,������T�
�+�-�#'�#:�#:�4��#I�L�B�S��$�$�S�#�.��$�$�R��+��$�$�W�-�1�0�%�)�)��-�,���$�$�W�-��1�0�0�sg�	F	�E
�/F	�8E=�E*
�)AE=�.F	�E'� E'�"F	�*E:�3E:�5E=�=F�F	�F.
�%F.
c���[FD�o[O29^tt^2o[OUQ29^tt^2oUOP
Q5PPP2PPP2WO
2OQQ2oQFD'oUOVQQQ5oUOVd2J)	J�	P!)%fhKl9h)%fhKw9h)rxr�r�r�rz)rlz--list�
rsr�captured_stdoutr-r,r�rr�rVrl�r!r`rjrOr�rurs&      r�test_list_command�!CommandLineTest.test_list_command�s���$��H��(�(�*�*�a��\�\�(�C�0�0�B��G�G�E�G�*�1�+��z�z�|�*�*�7�4F�G�H�%���o�o�c�7>�&�@��� � ��/�&�%�0�0��+�*�s/� C	�	C
�C	�C�	C�C	�C#
�C#
c���[FD�o[O29^tt^2o[OUQ29^tt^2oUOP	Q5PPP2PPP2WO
2OQQ2oQFD)oUOUQUQQ5oUOVd2J+	J�	P!)%fhKn9h)%fhKy9h)rxr�r�r�rlrzr|r�r�s&      r�test_list_command_verbose�)CommandLineTest.test_list_command_verbose�s���$��H��(�(�*�*�a��\�\�(�C�0�0�B��G�G�D�G�)�1�+��z�z�|�*�*�7�4F�G�H�(���o�o�c�4��7>�&�@��� � ��/�)�%�0�0��+�*�s/� C	�	C
�C	�C�C�
C	�C%
�C%
c���[OQQQ5oUOQU2vq#oUOQU2UO	UQ2UO	U]2P!)r�rrrlr�r)rrorZrrl�r!r�rTrrUs&    r�test_list_command_invalid_file�.CommandLineTest.test_list_command_invalid_file�sZ���"�"�<�8I�J���.�.�t�W�=�����
�
�/��5�����c�"�����Q�rc	���[OQQQ5[OQQQ5,oQFD�oUOU[,UN3oUO	UQ2[
O[29^tt^2oUO2PPP2[O[2J�	P!)%fhK09h[O[2h9h)r]r^rr_r)�-cz--create)
rrorVr�rlr-r,r rr��r!rarurrWs&    r�test_create_command�#CommandLineTest.test_create_command�s����!�!�"6�)7�9��!�!�#>�)7�9�:��
$�C�
*��o�o�c�7�;�U�;��� � ��c�*��\�\�'�*�*�c��N�N�$�+�� � ��)�$�+�*��� � ��)�s*�AC�C	�C�C
�	C
�C�C/c	���[OQQQ5[OQQQ5,oQFD�oUOUQ[,UN3QQ-oUO	QU2[
O[29^tt^2oUO2PPP2[O[2J�	P!)%fhK09h[O[2h9h)	r]r^rr_r�r{rWs file created.r|)
rrorVr�rr-r,r rr�r�s&    r�test_create_command_verbose�+CommandLineTest.test_create_command_verbose�s����!�!�"6�)7�9��!�!�#>�)7�9�:��
%�C�
*��o�o�c�4��@�5�@�7>�@���
�
�/��5��\�\�'�*�*�c��N�N�$�+�� � ��)�%�
+�*��� � ��)�s*�AC�
C	�C�C
�C
�C�C2c��[OQQQ5,oUOQ[,UN3oUO	UQ2[
O[29^tt^2oUO2PPP2[O[2P!)%fhK,9h[O[2h9h)r]r^rr�r)
rrorV�dotlessnamerlr-r,r rr�)r!rarrWs&   r�$test_create_command_dotless_filename�4CommandLineTest.test_create_command_dotless_filenames����!�!�"6�~�N�O��	*��/�/�$��<�e�<�C����S�#�&����k�*�*�c���� �+�
���[�)�+�*��
���[�)�s*�AB2�*B�;B2�B/	�(B/	�*B2�2Cc���[OO[Q2o[O
QQQ5,oUOQU,UN3oUOUQ2[OU29^tt^2oUO2PPP2[OU2P!)%fhK(9h[OS2h9h)z.testtarr]r^rr�r)
r{r|r}rzrrorVrlr-r,r rr�)r!r`rarrWs&    r�(test_create_command_dot_started_filename�8CommandLineTest.test_create_command_dot_started_filenames����7�7�<�<���4���!�!�"6�~�N�O��	'��/�/�$��9�5�9�C����S�#�&����h�'�'�3���� �(�
���X�&�(�'��
���X�&�s+�AC
�B7�C
�7C	�C	�C
�
C"c	�"�[OQQQ5[OQQQ5,o[[[[
1FD�oUO%fJ[Q*UO*oUOQU,UN3oUOU29^tt^2oUO2PPP2[OU2J�	P!)%fhK,9h[OW2h9h)r]r^rr_r�r�)rror6r=rCrJr,r�rrVr/r rr�)r!ra�filetyper`rrWs&     r�test_create_command_compressed�.CommandLineTest.test_create_command_compresseds����!�!�"6�)7�9��!�!�#>�)7�9�:��
"�7�H�h�?�H��=�=�=��
+�"�S�=�8�?�?�:���o�o�d�H�=�u�=���%�%�h�/�/�3��N�N�$�0�� � ��*�@�0�/��� � ��*�s+�!A
C6�.C#	�?C6�#C3
�,C3
�.C6�6Dc	��UO[2QFDqo[O[29^tt^2UOU[2oPPP2UO
WQ2[O[2Js	P!)%fhKB9h[O[2h9h)�-er)r�z	--extract�rcr�rr��	tarextdirrVrlr�r!rurs&  r�test_extract_command�$CommandLineTest.test_extract_command*s{��� � ��)�$�C�
,��'�'�	�2�2��/�/�#�w�7�C�3�� � ��c�*�� � ��+�
%�2�2��� � ��+�s)�"B$�B	�B$�B!
�B!
�B$�$Cc��UO[2QFDto[O[29^tt^2UOUQ[QQ5oPPP2UO
QW2[O[2Jv	P!)%fhKB9h[O[2h9h)ryr�rWrz� file is extracted.r|)rcr�rr�r�rVrrr�s&  r�test_extract_command_verbose�,CommandLineTest.test_extract_command_verbose4s���� � ��)�$�C�
,��'�'�	�2�2��/�/�#�t�W�;B�*�D�C�3��
�
�4�c�:�� � ��+�%�2�2��
� � ��+�s)�"B'�B	�B'�B$
�B$
�B'�'Cc�"�UO[2[OO	[
Q2o[O[
2[OU29^tt^2UOQ[QQQ2UOQ[QQQQQ5oUOQU2PPP2[O[
2P!)%fhK,9h[O[
2h9h)	�destr�ryz--filterrrrWrzr�)
rir�r{r|r}r�r�rr�rZrVrr)r!�destdirrs&  r�test_extract_command_filter�+CommandLineTest.test_extract_command_filter?s������w�'��'�'�,�,�y�&�1��
�����	(��#�#�G�,�,��'�'��g�(,�(2�F�<��o�o�d�G�&*�&0�/�7>�&�@���
�
�4�c�:�-�
���Y�'�-�,��
���Y�'�s+�C2�4AC�;C2�C/	�(C/	�*C2�2Dc�t�UO[2[O[29^tt^2UOQ[Q2oPPP2UO
WQ2[O[2P!)%fhK>9h[O[2h9h)r��spamdirrr�)r!rs& r�(test_extract_command_different_directory�8CommandLineTest.test_extract_command_different_directoryRsu��� � ��)�	(��#�#�I�.�.��o�o�d�G�Y�?��/����S�#�&����Y�'�	/�.��
���Y�'�s(�"B�B�B�B	�B	�B�B7c�J�[OQQQ5o[O[29^tt^2UOQU2vq#oPPP2UO
QW2UOWQ2UOW]2P!)%fhKH9h)r�rrr�r�r)rrorr�r�rZrrlr�s&    r�!test_extract_command_invalid_file�1CommandLineTest.test_extract_command_invalid_file[sy���"�"�<�8I�J��
�
�
�	�
*�
*��2�2�4��A�L�B�S�+��
�
�/��5�����c�"�����Q��	+�
*�s�B�B"	�B"	r$)r%r&r'r(rVrZrcrirorvr}r�r�r�r�r�r�r�r�r�r�r�r�r�r�r1r2r3s@rrNrN�su����7�
K�	C�6�.�+�;�.�(	0�	0� �
*�*� *�	'�+�",�	,�(�&(� � rrNc�F`�\sQsQsnQsQsQsQsQsQs	Qs
UsP!)	�ContextManagerTestidc���[O[29^tt^2oUOUOQ2PPP2UOWOQ2P!)%fhK.9h)zclosed inside runtime context�context manager failed)r-r,r)r6ryr>rJs& r�
test_basic�ContextManagerTest.test_basicfsI��
�\�\�'�
"�
"�c����S�Z�Z�)H�I�#�����
�
�$<�=�#�
"�s�A'�'A7	�0A7	c	��[O[2oUO2UO	[
29^tt^2U9^tt^2PPP2PPP2P!)%fhK9h)%fhP!9hr
)r-r,r)r[rUr�rJs& r�test_closed�ContextManagerTest.test_closedksS���l�l�7�#���	�	��
�
�
�w�
'�
'�����(�
'����(�
'�
'�s0�	A;�A(	�A;�(A8
�1A8
�3A;�;B	�B	c	�p�UO[29^tt^2o[O[29^tt^2o[
g)%fhL9hPPP2L)%fhL9hSO
WO[
Q2SOWOQ2P!)Nz)wrong exception raised in context managerr�)
rUr?r-r,r)r�r�r3r>ry)r!r�rWs&  r�test_exception�!ContextManagerTest.test_exceptiontsu��
�
�
�y�
)�
)�S����g�&�&�#��
�'�&��&�*�
)�
)�
)��	
���c�m�m�W�I�	K�����
�
�$<�=s)�#A&�A		�	A
�A
�A&�&A6	�/A6	c�2�[O[Q29^tt^2o[g)%fhL
9hL9hSO	[
OO[2]Q2SOWOQ2P!)r�z-context manager wrote an end-of-archive blockr�)
r-r,r�r?rlr{r|r�r>ryrJs& r�test_no_eof�ContextManagerTest.test_no_eof}sg��	����g�s�+�+�s���,�+��	������������1�1�?�	A�����
�
�$<�=s!�#A�-�=	�=	�A�A�Ac���[O[Q29^tt^2PPP2UO[O
O
[2]Q2P!)%fhKF9h)r�z-context manager wrote no end-of-archive block)r-r,r�rCr{r|r�r s&r�test_eof�ContextManagerTest.test_eof�sI���\�\�'�3�
'�
'��(����B�G�G�O�O�G�4�a�?�	A�(�
'�s�A%�%A5	�.A5	c	�f�[[Q29^tt^2o[OUQQ59^tt^2o[g)%fhL
9hL9hSO	SO
Q2SO
WO
Q2PPP2P!)%fhP!9h)r5r�r�zexternal file object was closedr�)r,r�r-r?r6ryr>r�s&  rr��ContextManagerTest.test_fileobj�sy���'�4�
 �
 �D�
��\�\�$�S�9�9�S�#�O�:�9��
������T�[�[�*K�L��O�O�C�J�J�(@�A�!�
 �
 �
 �sE�B� A�A	�A
�A
�A�B�A�A�=B�B0	�(B0	r$)r%r&r'r(r�r�r�r�r�r�r1r2r3s@rr�r�ds+����>�
�>�
>�A�
B�
Brr�zrequires os.link to be missingc�P`�\sQsQsnQs\O\\OQ2Q2Q2s
\O\\OQ2Q2Q2s\O\\Q2Q2Q	2s\O\\Q2Q2Q
2s
QsUsP!)�LinkEmulationTesti�c�N�UOOU[QQ5[[O
O
[U2Q29^tt^2oUO2oPPP2UO[W2[2P!)%fhK19h)rrvr�)rWryrzr,r{r|r}rkrlrro)r!r�r�rs&&  r�_test_link_extraction�'LinkEmulationTest._test_link_extraction�sf��������w���?�
�"�'�'�,�,�w��-�t�
4�
4���6�6�8�D�5�����4��.�9�5�
4�s�B�B$	�B$	�islinkz3Skip emulation - has os.path.islink but not os.linkc�*�UOQ2P!)r��r�r s&r�test_hardlink_extraction1�+LinkEmulationTest.test_hardlink_extraction1����	
�"�"�?�3rc�*�UOQ2P!)r�r�r s&r�test_hardlink_extraction2�+LinkEmulationTest.test_hardlink_extraction2����	
�"�"�#>�?rrWz Skip emulation if symlink existsc�*�UOQ2P!)r�r�r s&r�test_symlink_extraction1�*LinkEmulationTest.test_symlink_extraction1�r�rc�*�UOQ2P!)r�r�r s&r�test_symlink_extraction2�*LinkEmulationTest.test_symlink_extraction2�r�rr$)r%r&r'r(r�r�rnr�r{r|r�r�r�r�r1r2r3s@rr�r��s�����:��_�_�W�R�W�W�h�/�J�L�4�L�4��_�_�W�R�W�W�h�/�J�L�@�L�@��_�_�W�R��+�7�9�4�9�4��_�_�W�R��+�7�9�@�9�@rr�c�4`�\sQsQsnQsQsQsQsUsP!)�Bz2PartialReadTesti�c	�t`�U1QkQ[O2n[O[O
Q2O
22o[[U2]*2FD%o[ORUPU2UQ5J'	P![OcJCh9h)c�J:``�\sQsQsnP
sUU1QksUU1QksQsUsU9s	!)�9Bz2PartialReadTest._test_partial_input.<locals>.MyBytesIOi�c�:�UO%c[Q2gUO2[UO	226HUm[
RU_U2!)z(infinite loop detected in tarfile.open())�hit_eof�AssertionErrorr�rmrr�rk)r!r3�	MyBytesIOr�s&&��rrk�>Bz2PartialReadTest._test_partial_input.<locals>.MyBytesIO.read�sM����<�<�<�(�*:�;�;�#�y�y�{�c�$�-�-�/�.B�B����Y��2�1�5�5rc�2:�P
Um[RU_
U!r)r�r�r�)r!r�r�r�s&*��rr��>Bz2PartialReadTest._test_partial_input.<locals>.MyBytesIO.seek�s���$����Y��2�D�9�9r)r�)
r%r&r'r(r�rkr�r1r2r�)r�r4r�s@@�rr�r��s�����G�
6�
:�
:rr�rYr�)r*r�r>�compressr-r_r`�rangermr,rI)r!r"rr�r�s&&  @r�_test_partial_input�&Bz2PartialReadTest._test_partial_input�s����
	:��
�
�
	:��|�|�G�O�O�E�2�8�8�:�;���s�4�y�1�}�%�A�
����Y�t�B�Q�x�%8�t�D�&���$�$�
��
�s�7!B�B7�2B7�6B7c�*�UOQ2P!rE�r�r s&r�test_partial_input�%Bz2PartialReadTest.test_partial_input�s��� � ��%rc�*�UOQ2P!)rr�r s&r�test_partial_input_bz2�)Bz2PartialReadTest.test_partial_input_bz2�s��� � ��)rr$)	r%r&r'r(r�r�r�r1r2r3s@rr�r��s�����(&�*�*rr�c��]PHo]PHoUO]2]*Q6wcP
!UO	]2]*Q6wcP
!P	![cP
!h9h)r�root)rr�ImportError�getpwuid�getgrgid)rrs  r�root_is_uid_gid_0r�sS�����|�|�A��q��V�#��
�|�|�A��q��V�#����
����s�A�	A�A�A�chown�missing os.chown�geteuid�missing os.geteuidc��`�\sQsQsn\Q2s\\Q22s\OOQ2\OOQ2\OOQ2Q222s\OOQ2\OOQ2\OOQ2Q222s\O\2Q	2\OOQ2\OOQ2\OOQ2Q
2222s\OOQ2Q2sQsUsP!)
�NumericOwnerTesti�c	���[OQ2oU]c]b[OU1U]M]L[OP1U]X]W[OU1,o[O
[Q29^tt^2oSFDNvqgq�o
[OU2oV{mV�m	QUm
QUmV�mUOV�2JP	PPP2[!)%fh[!9h)scontentr�r�)r*r�r-r�r�r,r�r_r�r�r�r�r�rg)�
filename_1�	dirname_1�
filename_2rrr�r\r�r�r��typ�contentsrjs&&&         r�_make_test_archive�#NumericOwnerTest._make_test_archive�s����z�z�*�%���b�"�g�o�o�t�<��b�"�g�o�o�t�<��b�"�g�o�o�t�<����\�\�'�3�
'�
'�5�16�-��3�X��O�O�D�)������ ��� ������
�
�a�*�27�(���(�
'���s�9AC�C2	�&C2	c#� �]UmQoQoSoSo[OOV!2o[OUUU2o[OU29^tt^2oVsVE1w�PPP2P!)%fhP!9h3h)rznumeric-owner-testfiler�)r�r{r|r}rrr-r,)�mock_geteuidr4r0r	r
r�tar_filenamer\s&       r�_setup_test�NumericOwnerTest._setup_test
s~���%&��!�(�����
��	��W�W�\�\�'�1�
�(�:�:�:�;D�;E�G���\�\�,�
'�
'�5��Y�:�:�(�
'�
'�
'�s$�A%B
�'A9�/
B
�9B
	�B
	�	B
�os.chownr9�
os.geteuidc	��UOU29^tt^2vqEooUOU[P	QQ5UOU[P	QQ5PPP2[OO[W2o[OO[W2o	UO
[OOU]c]b2[OOU	]X]W2,P	Q5P!)%fhK�9h�Tr��
numeric_ownerrw)�	any_order)
rryrzr{r|r}�assert_has_callsr�r�call)
r!rrI�
mock_chownr\r	r�r�f_filename_1�f_filename_2s
&&&&      r�test_extract_with_numeric_owner�0NumericOwnerTest.test_extract_with_numeric_owner"
s���
�
�
�l�
+�
+�0<��1�0:��M�M�*�g�T�!0�
�
2��M�M�*�w�d�!0�
�
2�	,��w�w�|�|�G�Z�8���w�w�|�|�G�Z�8���#�#�X�]�]�%7�%7��b�"�%M�%-�]�]�%7�%7��b�"�%M�%'�/3�	$�	4�,�
+�s�7C7�7D	�D	c	�h�UOU29^tt^2vqEooUO[P	QQ5PPP2[OO[W2o[OO[W2o	[OO[W2o
UO
[OOU]c]b2[OOU	]M]L2[OOU
]X]W2,P	Q5P!)%fhK�9hr)
rrrzr{r|r}rr�rr)r!rrIrr\r	r
rr�f_dirname_1r s&&&&       r�"test_extractall_with_numeric_owner�3NumericOwnerTest.test_extractall_with_numeric_owner7
s���
�
�
�l�
+�
+�0<��9�0:����W�D�$3�
�
5�,��w�w�|�|�G�Z�8���w�w�|�|�G�Y�7���w�w�|�|�G�Z�8���#�#�X�]�]�%7�%7��b�"�%M�%-�]�]�%7�%7��R��%L�%-�]�]�%7�%7��b�"�%M�%'�/3�		$�	4�,�
+�s�D!�!D1	�*D1	z uid=0,gid=0 must be named "root"c	��UOU29^tt^2vqEoUOU[P
QQ5PPP2[OO[W2oUO
U]]2P!)%fhKI9h)Frr)rryrzr{r|r}�assert_called_with)r!rrIrr\r	r�rs&&&&    r�"test_extract_without_numeric_owner�3NumericOwnerTest.test_extract_without_numeric_ownerP
sn���
�
�l�
+�
+�/H��1�a��M�M�*�g�U�!0�
�
2�,�
�w�w�|�|�G�Z�8���%�%�l�A�q�9�,�
+�s�A:�:B
	�B
	c
���UOU29^tt^2vq#oUO[UOU[P
P	2PPP2P!)%fhP!9hr)rrUr�ryrz)r!rr\r	r�s&&   r�test_keyword_only�"NumericOwnerTest.test_keyword_only`
sK��
�
�
�l�
+�
+�/H��1�a����i�#�m�m�Z��%��
O�,�
+�
+�
+�s�-A�A#	�A#	r$)r%r&r'r(rmrrrr�rrr!r%r�rr)r,r1r2r3s@rrr�si��������.��;���;�(�]�]����$�
�]�]����$�
�]�]����&�4�'�%�%�4�$�]�]����$�
�]�]����$�
�]�]����&�4�'�%�%�4�,���*�,�;�=�
�]�]����$�
�]�]����$�
�]�]����&�	:�'�%�%�=�
	:��]�]����&�O�'�Orrc�@`�\sQsQsnQsQsQsQsQsQs	Us
P!)�ReplaceTestsig
c�<�UOOQ2oUOQQ5oUOUOQ2UOUOQ2UOUOOQ2OQ2P!)rgz
misc/otherr�)rWrirFrlr��r!r��replaceds&  r�test_replace_name�ReplaceTests.test_replace_nameh
sv�����#�#�O�4���>�>�|�>�4���������5�������o�6�������+�+�O�<�A�A�(�	*rc�:�UOOQ2oUO2oQUOQ$UO	UOQ*Q2UO	UOOQ2OQ*Q2P!)r��not-barr�r��rWrirFr�rlr1s&  r�test_replace_deep�ReplaceTests.test_replace_deepp
s{�����#�#�N�3���>�>�#��(1����W�%�����+�+�G�4�e�<�����H�H���~�.�:�:�7�C�U�	Lrc�>�UOOQ2oUOP
Q5oQUOQ$UO	UOQ*Q2UO	UOOQ2OQ*Q2P!)r�)�deepr6r�r7r1s&  r�test_replace_shallow�!ReplaceTests.test_replace_shallowx
s�����#�#�N�3���>�>�u�>�-��(1����W�%�����+�+�G�4�i�@�����H�H���~�.�:�:�7�C�Y�	Prc
�V�UOOQ2oQFDqoUOUQ59^tt^2UOQ-UP-@oUO	[V22P2UO
[V2P2PPP2Js	P!)%fhJ�9h)rg��	attr_name)r�r�r"rr�r�r�r�r$)rWrir�rFrlr�rC)r!r�r@r2s&   r�test_replace_all�ReplaceTests.test_replace_all�
s������#�#�O�4��:�I����	��2�2�!�>�>�>�Y��,=�>��� � ���!=�t�D��#�#�G�F�$>��E�3�2�:�2�2�2�s�AB	�B(
� B(
c���UOOQ2oUO[29^tt^2UO	QQ5PPP2P!)%fhP!9h)rgi�[)r�)rWrirUr�rF)r!r�s& r�test_replace_internal�"ReplaceTests.test_replace_internal�
sD�����#�#�O�4��
�
�
�y�
)�
)��N�N�)�N�,�*�
)�
)�
)�s�A�A(	� A(	r$)r%r&r'r(r3r8r<rArDr1r2r3s@rr/r/g
s&����*�L�P�F�-�-rr/c�`�\sQsQsnPs\Q2s\Q2sQs\	Q2s
QsQsQs
Q	sQ
sQsQsQ
sUsP!)�NoneInfoExtractTestsi�
c	�`�[O[QQQ5o[O[
2Q*Rm]Um[29^tt^2oROe,UO[OQ[Q52UOROROQ5PPP2UO2[ 9PIcJ.U1Qk[ORO2O#Q22DjJ	RmP!U1Qk[ORO2O#Q222RmP!)%fhK�9h)	rxrSrT�extractall_ctrl�ignore)�action�categoryrvc3�f:�SF �D!oUORO2w�	J#	P!3hr
)�relative_to�control_dir)�.0�pr�s& �r�	<genexpr>�2NoneInfoExtractTests.setUpClass.<locals>.<genexpr>�
s&��?���?��
�M�M�#�/�/�*�*�?�s�)1�**/*)r-r,r)rrrzrOr�r�extraction_filter�
enter_context�warnings�catch_warnings�DeprecationWarningrr[�set�glob�
control_paths)r�rW�cmsf  rr��NoneInfoExtractTests.setUpClass�
s����l�l�7��{�C��!�,�,�w�/�2C�C������
�[�[�B��$�$�,�� � ��!8�!8�#�.@�"B�C��N�N�3�?�?�3�3H�3H�N�I�	�
	�	�	���C� A��\�\�#�/�/�2�7�7��?� A�C���C� A��\�\�#�/�/�2�7�7��?� A�A���
�[�s�E0�.AE0�0F	�9F	c�H�[OUO2P!r
)�shutilrrOr�s&rr��"NoneInfoExtractTests.tearDownClass�
s���
�
�c�o�o�&rc�`�[9PIc9.U1Qk[OR2OQ22DjJ	L2U1Qk[OR2OQ222oUOQ7c0QFD(oUO[OU22J*	UO
UOU2P!)c3�R:�SF �DoUOR2w�	J	P!3hr
)rN)rPrQr�s& �rrR�;NoneInfoExtractTests.check_files_present.<locals>.<genexpr>�
s"��9���9��
�M�M�)�$�$�9�s�'rT)Nr)rrr)rZrrr[rU�discardrlr\)r!r��	got_pathsr|s&f  r�check_files_present�(NoneInfoExtractTests.check_files_present�
s�����C�;��\�\�)�,�1�1�&�9�;�C�C�;��\�\�)�,�1�1�&�9�;�;�	��!�!�^�3�J���!�!�'�,�,�t�"4�5�K�����+�+�Y�7rc	'� �[O[2Q*o]UOmUOO2FDoSFDo[
V4P2J	J	[OU29^tt^2UOOUQQ5UOU2Uw�PPP2P!)%fhP!9h3h)�extractall_nonerrv)rrrzrWr�r �setattrrrrrg)r!�
attr_namesrr�r@s&*   r�extract_with_none�&NoneInfoExtractTests.extract_with_none�
s�����l�l�7�#�&7�7��������h�h�)�)�+�F�'�	���4�0�(�,��
�
��
$�
$��H�H����O��<��$�$�S�)��I�%�
$�
$�
$�s$�B
C�4C
�
C�
C	�C	�	Cc�z�[O[2O2OoUOQ29^tt^2o[OU2O
Q2FDkoUOUQ59^tt^2UO2OoUOUO2OU2PPP2Jm	PPP2P![cSO2%fgK:h9h)%fhJ�9h)%fhP!9h)r�rT�r|)rrrzr�st_mtimermr[r��assertGreaterEqualr��
is_symlink)r!�nowrr|r�s&    r�test_extractall_none_mtime�/NoneInfoExtractTests.test_extractall_none_mtime�
s����l�l�7�#�(�(�*�3�3��
�
#�
#�G�
,�
,�����S�)�.�.�v�6���\�\�t�\�,�,�K� $�	�	�� 4� 4���/�/��	�	��0D�0D�c�J�-�,�7�-�
,��
#�"�#���0�0�!� 1�"��-�,�,��-�
,�
,�sa�
AD)�D
�C-�-*D
�D)�-	D�7D�D�D
�D�D
�D&�D&� 	D)�)D:	�2D:	c�:�[O[2O2Oo[O[2Q*oUOP2UO2OoUO
Q29^tt^2o[OU2OQ2FD�oUOUQ59^tt^2UO2%c,UOUO2OU2L@UO2%c+UOUO2OU2PPP2J�	PPP2P!)%fhJ�9h)%fhP!9h)�regular_filer"rTrp)rrrzrr�
write_textrmr[r��is_dirrl�is_file)r!�dir_moderx�regular_file_moderr|s&     r�test_extractall_none_mode�.NoneInfoExtractTests.test_extractall_none_mode�
s���<�<��(�-�-�/�7�7���|�|�G�,�~�=������#�(�-�-�/�7�7��
�
#�
#�F�
+�
+�s����S�)�.�.�v�6���\�\�t�\�,�,��{�{�}�}��(�(�����)<�)<�h�G�������(�(�����)<�)<�):�<�	-�,�7�,�
+�,�,�,��,�
+�
+�s>�AF	�E5
�4AE5
�5*E5
�F	�5F�>F�	F	�	F	�F	c�v�UOQ29^tt^2PPP2P!)%fhP!9h)r��rmr s&r�test_extractall_none_uid�-NoneInfoExtractTests.test_extractall_none_uid�
�%��
�
#�
#�E�
*�
*��+�
*�
*�
*���'�8	�8	c�v�UOQ29^tt^2PPP2P!)%fhP!9h)r�r�r s&r�test_extractall_none_gid�-NoneInfoExtractTests.test_extractall_none_gid�
r�r�c�v�UOQ29^tt^2PPP2P!)%fhP!9h)r�r�r s&r�test_extractall_none_uname�/NoneInfoExtractTests.test_extractall_none_uname�
�%��
�
#�
#�G�
,�
,��-�
,�
,�
,�r�c�v�UOQ29^tt^2PPP2P!)%fhP!9h)r�r�r s&r�test_extractall_none_gname�/NoneInfoExtractTests.test_extractall_none_gname�
r�r�c�|�UOQQQQ29^tt^2PPP2P!)%fhP!9h)r�r�r�r�r�r s&r�test_extractall_none_ownership�3NoneInfoExtractTests.test_extractall_none_ownership�
s,��
�
#�
#�E�5�'�7�
C�
C��D�
C�
C�
C�s�*�;	�;	r$)r%r&r'r(rUr�r�r�rgrrmrur~r�r�r�r�r�r1r2r3s@rrGrG�
sw�������A��A��'��'�8��	��	�K� <� �����rrGc��\sQsQsQsQsP!)�NoneInfoExtractTests_Datai�
rr$�r%r&r'r(rUr1r$rrr�r��
s���rr�c��\sQsQsQsQsP!)�!NoneInfoExtractTests_FullyTrustedi�
rr$r�r$rrr�r��
s��'�rr�c��\sQsQsQsQsP!)�NoneInfoExtractTests_Tari�
rWr$r�r$rrr�r��
s���rr�c��\sQsQsPsQsP!)�NoneInfoExtractTests_Defaulti�
r$r�r$rrr�r��
s���rr�c�.`�\sQsQsnQsQsQsUsP!)�NoneInfoTests_Miscic��[O2o[O[O[O
1FCD$oUO
UQ59^tt^2[OUQUQ5oUO[2o[[Q29^tt^2oUOVE2PPP2QFD�oUO
UQ59^tt^2UOQ-UP-@oUO[U29^tt^2[[Q29^tt^2oUOVu2PPP2PPP2PPP2J�	PPP2CJ'	P!)%fhK�9h)%fhKF9h)%fhKQ9h)%fhJ�9h[cS[O6XcK~gh9h)%fhCJ�9h))�	tarformatr�)r�r"r�r�r?)r�r"r�r�r�r�r$)r*r�r-r�r�r�r�r,r�r)rgrFrOr�r?)r!�bior�rWrqr�r@r2s&       r�test_add�NoneInfoTests_Misc.test_addsk���j�j�l��!�.�.��0B�0B�!�,�,�.�I����	��2�2��l�l�3�S��K���.�.��1��=��g�t�,�,�����G�/�-�&6�	�!�\�\�I�\�>�>�'.���'K�)�T�9J�'K�H�!%�!7�!7�
�;D�+�"H�"H�%)�'�4�%8�%8�A�$'�K�K��$<�&9�"H�?�>�&6�3�2�.�-�,�� &9�%8��"H�"H��?�>�>��!�� �G�$8�$8�8���
��
3�2�2�s��%/G&	�F?�-E2
�?F?� G&	�'5F+�F�5F�F�F+�G&	�2F�;F�=F?�F�F�F�F(�!F(�#F+�+F<�4F<�6	G&	�?	G#�	G#�G&	�!G#�#G&	�&G8
�/G8
c��
�Q.Q.Q.Q.Q.Q.QQ.QQ.1FCDoUOUQ59^tt^2[O[QQ59^tt^2o[O
[O2Q	Q
Q5o[O[QU29^tt^2UO2PPP2UO2FDoSFDo[VEP2J	J	[O
[O2Q	Q
Q5o[O[QU29^tt^2UO2PPP2[UO2O2O!2UO2O2O!22FCDFvqxUQ.6Xc2["O$Q
U2%cUO'UQ2J?UQ.6Xc2["O$QU2%cUO'UQ2JxUQ.6Xc2["O$QU2%cUO'UQ2J�UQ.6XcdUO)Q2%cMUO!Q2vq�UO!Q2vq�UO'V�2UO+UQ2CJUQ.6XcdUO-Q2%cMUO!Q2vq�UO!Q2vq�UO'V�2UO+UQ2CJ�UQ.6XcdUO)Q2%cMUO!Q2vq�UO!Q2vq�UO'V�2UO'UQ2CJ�UQ.6XcdUO-Q2%cMUO!Q2vq�UO!Q2vq�UO'V�2UO'UQ2CJ]UQQ.6XcdUO)Q2%cMUO!Q2vq�UO!Q2vq�UO'V�2UO'UQ2CJ�UQQ.6XcdUO-Q2%cMUO!Q2vq�UO!Q2vq�UO'V�2UO'UQ2CJ5UO'Vx2CJI	PPP2PPP2CJ	P!)%fhCKk9h)%fhCK�9h)%fhKG9h)%fhCJT9h)r�r"r�r�r�r�)rlrSrr�r�r�r�s2003-01-\d\ds
????-??-??s\d\d:\d\d:\d\ds??:??:??s.([r-][w-][x-]){3}s
??????????�/s[0-9]+�1000/sNone�/100)�tarfile/�lars/�foo/)�/tarfile�/users�/bar)r�r�r�r�)r�r�r�r�)r�r-r,r)r*rr�rrrr�r rkrArrr��re�matchrlr�r�endswith)
r!rlrW�tio_prevr�r@�tio_newr��got�exp_user�	exp_group�got_user�	got_groups
&            rr	�NoneInfoTests_Misc.test_list s\��
$�9�v�h���%��#�9�w�i�!�7�+�e�W�-=�?�J��,�,�*�,�5�5��,�,�w��=�=���+�+�B�J�J�L�'�4�P���&�&�s�H�h�?�?��H�H�J�@�!�n�n�.�F�%/�	���4�8�&0�/��*�*�2�:�:�<��$�O���&�&�s�H�g�>�>��H�H�J�?�%(����):�)C�)C�)E�)K�)K�)M�)0���)9�)B�)B�)D�)J�)J�)L�&N�&N�M�H�!�g�Y�.�2�8�8�<L�h�3W�3W��(�(��m�<�#��y�0�R�X�X�>P�RZ�5[�5[��(�(��k�:�#��x�/�B�H�H�2�H�5>�5>��(�(��m�<�#��y�0�X�5H�5H�<�6>�6>�.6�n�n�T�.B�+��.1�i�i��o�+���(�(��>��(�(��9�=�#��y�0�X�5F�5F�=�6?�6?�.6�n�n�T�.B�+��.1�i�i��o�+���(�(��<��(�(��I�>�#��w�.�8�3F�3F�%�4(�4(�.6�n�n�T�.B�+��.1�i�i��o�+���(�(��>��(�(��7�;�#��w�.�8�3D�3D�g�3O�3O�.6�n�n�T�.B�+��.1�i�i��o�+���(�(��<��(�(��G�<�#��w�'7�7�H�<O�<O�F�=H�=H�.6�n�n�T�.B�+��.1�i�i��o�+���(�(��>��(�(��7�;�#���'7�7�H�<M�<M�F�=H�=H�.6�n�n�T�.B�+��.1�i�i��o�+���(�(��<��(�(��G�<��(�(��7�]&N�>�6�5�?�@�?�?��?�>�>��>�=��6�5�5�s��%U	�AU
�+T�<BU
�T2�A6U
�
U
�'U
�U
� U
�<U
�U
�5U
�AU
� U
�7AU
�U
�"AU
�6U
�
AU
�"U
�9AU
�U
�%A"U
�U	�T/�'T/�)	U
�2U�;U�=	U
�U�U�U	�U+
�"U+
r$)r%r&r'r(r�r	r1r2r3s@rr�r�s����=�8A8�A8rr�c	��UQ*oQ[OQ]-U]**Q[OQ]-U]***Q[OQ]Q[O[O*Q[O-U]***Q[O
Q]-U]***Q[OQ]-U]***Q[OQ]Q[O[O*Q[O-U]***Q[OQ]-U]***Q[OQ]-U]***Q[OQ]Q[O[O*Q	[O-U]***oU!)
z~Inverse of `stat.filemode` (for permission bits)

Using mode strings rather than numbers makes the later tests more readable.
:r�NNrx�-r�r�r��Srj�T)
r�S_IRUSR�S_IWUSR�S_IXUSR�S_ISUID�S_IRGRP�S_IWGRP�S_IXGRP�S_ISGID�S_IROTH�S_IWOTH�S_IXOTH�S_ISVTX)r"�str_mode�results&  r�_filemode_to_intr�cs���
�B�x�H�����c�1�
%�h�q�k�
2�����c�1�
%�h�q�k�
2�3�����c�1�����t�|�|�+������&�q�k�+�+�
����c�1�
%�h�q�k�
2�3�����c�1�
%�h�q�k�
2�
3�����c�1�����t�|�|�+������&�q�k�+�	+�����c�1�
%�h�q�k�
2�
3�����c�1�
%�h�q�k�
2�3�����c�1�����t�|�|�+������&�q�k�+�+��(�Mrc�``�\sQsQsnQsQsQsQsQPQPQPQ	PQ
PQP-QksQ
s	Qs
UsP!)rHiz�Helper to create a tar file with specific contents

Usage:

    with ArchiveMaker() as t:
        t.add('filename', ...)

    with t.open() as tar:
        ... # `tar` is now a TarFile with 'filename' in it!
c�\�[O2Um[U2UmP!r
)r*r�r��dict�
tar_kwargs)r!r�s&,rr��ArchiveMaker.__init__�s���:�:�<����v�,��rc�p�[OQQQQUO-UO@UmU!)r"r�r�r$)r-r.r�r��tar_wr s&r�	__enter__�ArchiveMaker.__enter__�s,���_�_�S�#�S�t�x�x�S�4�?�?�S��
��rc��UOO2UOO2UmPUmP!r
)r�r[r�rr
)r!r�s&*r�__exit__�ArchiveMaker.__exit__�s-���
�
�������)�)�+��
���rr�rE�hardlink_tor"rn�contentc���[U2o[OU2OQ-U@o	Ud2[	U[2%cUO2o[
U2oUd VimUe[U	O2oU%c[U2U	m
Ud![Oo[U2U	mUd![Oo[U2U	mUOQ2%cUe[OoUdV)mU	O#2%c[$O&U2o
LPo
UO(O+V�2P!)abAdd a member to the test archive. Call within `with`.

Provides many shortcuts:
- default `type` is based on symlink_to, hardlink_to, and trailing `/`
  in name (which is stripped)
- size & content defaults are based on each other
- content can be str or bytes
- mode should be textual ('-rwxrwxrwx')

(add more! this is unstable internal test-only API)
r�r$)r�r-r_rFrr�rmrnr�r�r"rrr�r�r�r�r�r*r�r�rg)r!r�r�rEr�r"rnr�r�rqr�s&&$$$$$$,  rr��ArchiveMaker.add�s���4�y���/�/�$�'�/�/�9�&�9�����'�3�'�'�!�.�.�*���w�<�D����L�������-���+�D�1�G�L��!��?�?�D�"�:��G���"��?�?�D�"�;�/�G���=�=����$�,��?�?�D����L��=�=�?�?��j�j��)�G��G��
�
���7�,rc�v�[OUO2o[OQQU-U@!)z9Open the resulting archive as TarFile. Call after `with`.r�r$)r*r�r
r-r,)r!r�r�s&, rr,�ArchiveMaker.open�s+���j�j����'���|�|�2�C�2�6�2�2r)r�r
r�r�)r%r&r'r(r�r�r�r�r�r,r1r2r3s@rrHrHsV����	�'���
'-��'-��'-�4�'-��'-� �'-�*.�'-�R3�3rrHc�<�[OQ2U2!)zWASI: Skip symlink test for now)r��skip�r�s&r�symlink_testr��s���}�}�>�?��B�Brc��U!r
r$r�s&rr�r��s���rc	�`�\sQsQsn\O
\2Q*s\Q*s\	Q2s
\QP	-Qk2sQ>Qks
QsQ?Q	ksQ
sQs\Q2s\\O*Q
22s\Q2s\Q2s\\O*Q22sQs\Q2s\Q2s\\O*Q22s\\O*Q22s\\O*Q22s\\O*Q22s \Q2s!\Q2s"\Q2s#\Q2s$\Q2s%\Q2s&\\'OP\)\*Q2Q2\'OP\)\*Q 2Q!2\'OP\)\*Q"2Q#2\+OXQ$\-O\\-O^12Q%22222s0\\'OP\)\*Q2Q2\'OP\)\*Q 2Q!2\'OP\)\*Q"2Q#2\+OXQ$\-O\\-O^12Q&22222s1Q's2Q(s3Q)s4Q*s5Q+s6Q,s7Q-s8Q.s9\'Ot\;OxQ/6HQ02Q12s=\'Ot\;OxQ/6HQ02Q22s>Q3s?Q4s@Q5sAQ6sBQ7sCQ8sDQ9sEQ:sF\+OXQ;\-O�\-O�,2Q<2sIQ=sJUsKP!)@�TestExtractionFiltersi��outerdirr�c��[O2%CcR[OO	[
Q2o[OU2[OQ[OO	UQ22[[OO	UQQQ2Q29^tt^2PPP2[OO[OO	UQ22%c
P	Um
P![OO[OO	UQQ22%c
P
Um
P![Q2gP
Um
P!)%fhK�9h)�resolution_testr��currentr�rzr�z#Could not determine link resolution)r�can_symlinkr{r|r}rzr�rWr,r-�dotdot_resolves_earlyr�)r��testpaths& rr�� TestExtractionFilters.setUpClass�s���
� � �"�"��w�w�|�|�G�->�?�H��H�H�X��
�J�J�s�B�G�G�L�L��9�=�>��b�g�g�l�l�8�Y��f�E�s�K�K��L��w�w�~�~�b�g�g�l�l�8�V�<�=�=�-1��)�����������X�t�V� D�E�E�-2��)�$�%J�K�K�(-�C�%�L�K�s�E8�8F	�F	�
check_flagc#� �[OUO29^tt^2UOQ*oUOQ2UO	UO
UQ5PUmP
Um[UOOQ22Um
UOOUO
2UOOU2Uw�UO2UO%c
UOgUOUO[22U%c!UOUO2Q2PPP2P![c'oXPmP	Sm[2Sm
Po=K�Po=hh9hSO2h9h)%fhP!9h3h)a�Extracts `tar` to `self.destdir` and allows checking the result

If an error occurs, it must be checked using `expect_exception`

Otherwise, all resulting files must be checked using `expect_file`,
except the destination directory itself and parent directories of
other files.
When checking directories, do so before their contents.

A file called 'flag' is made in outerdir (i.e. outside destdir)
before extraction; it should not be altered nor should its contents
be read/copied.
�flagz
capture mervrT)rrr�ryrr��raised_exception�reraise_exceptionrZr[�expected_pathsrer?r[rlr;)r!rWrwr��	flag_pathr�s&&&$  r�
check_context�#TestExtractionFilters.check_context�sV����
�
��
�
�
.�
.��
�
��.�I�� � ��.�
7����t�|�|�F��;�)-��%�).��&�&)�$�-�-�*<�*<�V�*D�&E��#��#�#�+�+�D�L�L�9��#�#�+�+�I�6�
��
��	�	���%�%�%��+�+�+����T�0�0�#�%�8��� � ��!4�!4�!6��E�//�
.��
�
,�(+�%�)-��&�&)�e��#�#��
,���	�	���%/�
.�
.�sw�*G
�%F9�E0�/A7F9�'F$�,!F9�7F9� F9�&
G
�0	F!�:F!�;F�F9�F!�!F9�$F6�6F9�9G
	�G
	�	G
c��UO%c
UOg[O[OOUOU*22oUOVpO2UOOU2Ud�[O2%ci[OQ6wcT[O[OUO2O 22oUO#V�2Ue>[%U[&2%c(UO)Q2%c[*O,oUd`UOU*O/2o[OU2o	V�6wc!UO1UO3U	22L�U[*O86XfUe!UO1UO;22L�U[*O,6Xc!UO1UO=22LuU[*O>6Xc!UO1UOA22L@U[*OB6Xc!UO1UOE22L[GU2gUd+UO#UO2OHU2Ud!UO#UOK2U2UOLFDoUOOOU2J 	P![4c o
S
O7QS	8QS802gPo
=
hh9h)z'Check a single file. See check_context.�ntr�z	expected=z, got=)(r�rrr{r|�normpathr�rr��remover�	can_chmodr�rr#�S_IMODErrlrr�r�r-r��readlinkr>�samefiler?�add_noter�r{rzr�is_fiforrs�NotImplementedErrorrfr;�parentsre)r!r�r�rEr"rnr�r|r�r�r��parents&&&&&&&     r�expect_file�!TestExtractionFilters.expect_file'sE��� � � ��'�'�'��|�|�B�G�G�,�,�T�\�\�D�-@�A�B���
�
�d�/�/�0����"�"�4�(���	� 3� 3� 5� 5�"�'�'�T�/��-�-����T�Y�Y�[�-@�-@� A�B�C����S�'��<�J�t�S�1�1�d�m�m�C�6H�6H��?�?�D��!��<�<�$�&�0�0�2�C��|�|�J�/�H�
��?��O�O�C�L�L��$:�;��
�W�_�_�
$����O�O�D�L�L�N�+�
�W�_�_�
$��O�O�D�K�K�M�*�
�W�%�%�
%��O�O�D�L�L�N�+�
�W�_�_�
$��O�O�D�O�O�-�.�%�d�+�+������T�Y�Y�[�0�0�$�7������T�^�^�-�w�7��l�l�F����'�'��/�#��%�
��
�
�i�h�[��3�&�1�2���
�s$�L+�$ L+�+	M�5M�6M�Mc��UOU*O2oUOU[OQ5UO
Tt.tFDoV#O7fJUjJ	toUmP!ttoh)z-Check a directory; forget about its contents.�r�)r��resolverr-r�r�r)r!r��	tree_pathrQs&&  r�expect_any_tree�%TestExtractionFilters.expect_any_treeSsg���\�\�D�(�1�1�3�	���������9��*�*�
�*�!��	�	�)�
�A�*�
����
s�A:�*A:c���UOV29^tt^2UOd
UOgPPP2P
UmUO!)%fhK#9hr
)rOr�r�)r!�exc_type�
message_res&&&r�expect_exception�&TestExtractionFilters.expect_exception\sT��
�
#�
#�H�
9�
9��$�$�0��+�+�+�1�:�"'����$�$�$�	:�
9�s�A�A�A"	�A"	c	�F�[29^tt^2oUOQ2PPP2QFDEoUOWO2U29^tt^2UO	Q2PPP2JG	P!)%fhK^9h)%fhJo9h)z
benign.txt)rrWr�rHr�r�r,r�r!rJrws&  r�test_benign_file�&TestExtractionFilters.test_benign_filecsi��
�^�^�s��G�G�L�!��4�F��#�#�C�H�H�J��7�7�� � ��.�8�7�5��^��8�7�7�s#�A<�B	�<B	�B	�B 
�B 
c	��[29^tt^2oUOUOQ*2PPP2UOWO	2Q29^tt^2UOQ2PPP2QFD�oUOUO	2U29^tt^2[
UO2OQ2%c:[
UO2OQ2oUOUQ02L UO[OQ2PPP2J�	P!)%fhCK9h)%fhK�9h)%fhJ�9h)zescaped.evilrz../escaped.evilr�z
/escaped.evilz+['"].*escaped.evil['"] has an absolute path�rWr)rHr�r�r�r,rr�r��lstripr
r-�AbsolutePathError)r!rJrw�outerdir_strippeds&   r�
test_absolute�#TestExtractionFilters.test_absolutejs���^�^�s��G�G�D�M�M�N�2�3���
�
����
�O�
<�
<����.�/�=�$�F��#�#�C�H�H�J��7�7��t�}�}�%�0�0��5�5�),�D�M�M�(:�(A�(A�#�(F�%��$�$�(9�':�-�%H�I��)�)��1�1�I�K�8�7�$�
�^�^��=�
<��8�7�7�s<�#E�'E�/*E(	�AE(	�E	�
E	�E%	�E%	�(E9
�1E9
c��[29^tt^2oUOQQQ5UO%c0[O2%cUOQQQ5LUOQQQ5UOQ2PPP2[O2%Cc}UOWO
2Q29^tt^2UOQQQ5UO%cUOQQQ5LUOQQQ5UOQ2PPP2UOUO
2Q	29^tt^2UO[OQ2PPP2UOUO
2Q
29^tt^2UO%c"UO[OQ
2L7UOQQQ5UOQQQ5UOQ2PPP2P!UOWO
2Q29^tt^2UOQ2PPP2UOUO
2Q	29^tt^2UOQ2PPP2UOUO
2Q
29^tt^2UOQ2PPP2P!)%fhCKq9h)%fhCK�9h)%fhCK�9h)%fhP!9h)%fhK�9h)%fhK�9h)%fhP!9h)r�r�rDrz
current/../..z
current/..�parent/evilrrgrWrrh�T'parent/evil' would be extracted to ['"].*evil['"], which is outside the destinationzK'parent' would link to ['"].*outerdir['"], which is outside the destination)rHr�r�rr�r�r,rr
r-�OutsideDestinationError�LinkOutsideDestinationError�r!rJs& r�test_parent_symlink�)TestExtractionFilters.test_parent_symlink�s����^�^�s�

�G�G�I�#�G�.��)�)�)�i�.C�.C�.E�.E�����_��=�����\��:��G�G�M�"��� � �"�"��#�#�C�H�H�J��@�@�� � ��s� �;��-�-�-��$�$�X�/�$�J��$�$�X�,�$�G�� � ��+�
A��#�#�C�H�H�J��6�6��%�%��3�3�9�:�7��#�#�C�H�H�J��7�7��-�-�-��)�)��;�;�=�>��$�$�Y�3�$�?��$�$�X�#�$�>��$�$�V�,�8�7�"�#�#�C�H�H�J��@�@�� � ��/�A��#�#�C�H�H�J��6�6�� � ��/�7��#�#�C�H�H�J��7�7�� � ��/�8�7�g�^�^�� A�@�@��7�6�6��8�7�7��"A�@��6�6��7�7�7�s��%K5�K5�8K5�%L	�?8L	�'!L�8L1�AL1�M�M�M+�5L	�>L	�	L	�L	�L.	�&L.	�1M	�:M	�M	�M	�M(	�!M(	�+M<	�4M<	c��	�[29^tt^2oQo[OQ6XcQoL�Q[O7c|[O
UOOQ2o]o[[UO22U*oVF*
[U2U**oQU*oL[Q2gPoPo	SFD�o
UO[OOV�2[O QQ5UO[OOV�2UQ5[OOV�2o[OOV�2o	J�	[OO,UNQM3oQ,[U2*oUOU[OOUQ5UOQ	[OOUQ2Q5UOQ
[OOQ	Q2Q5UOQ
Q
Q5UOQQQ5PPP2UO#Q29^tt^2UO%WO'2QP
Q59^tt^2[OQ6XcUO)[*[,12L�UO.%cUO)[02LkUO3W2UO5Q
Q
Q5UO5QQQ5UO5Q	[O6Q5UO5QUQ5PPP2PPP2QFD�o
UO#U
29^tt^2UO%WO'2U
Q59^tt^2UO)[8[012o[;U[82%c][OQ6XcUO=UO>Q2L*UOAUOB[BOD2PPP2PPP2J�	P!)%fhCK9h)%fhCK9h)%fhCK&9h)%fhKZ9h)%fhCJK9h)�abcdefghijklmnopr�d�PC_PATH_MAXz1Need to guess component length for {sys.platform}�
drwxrwxrwxrGrDr��escape�flaglinkr��r��	overwrite�r�zescape/newfile�newr)rwr�z
../newfilerr�rv�ddddddddddddddddddddddddd�llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllr)rer���)#rHrr
r{�pathconf_names�pathconfr�rrmr�r�r�r�r|r}r-r�r�r�r,r
rPr�r�r�rrrr�rr�winerrorrl�errno�ENAMETOOLONG)r!rJ�steps�	component�max_path_len�path_sep_len�dest_len�
component_lenr|�	step_pathr{�linkpath�parent_segmentsrwr�s&              r�test_realpath_limit_attack�0TestExtractionFilters.test_realpath_limit_attack�sy��
�^�^�s�
'�E��|�|�w�&�$�	��"�"3�"3�3�!�{�{�4�=�=�+?�+?��O�� ���s�4�<�<�0�1�L�@��!-�!8�c�%�j�<�>W� X�
��-�/�	�)�*]�^�^��D��I�����������T�5�G�O�O�)��+���������T�-�)��D��w�w�|�|�D�4���G�G�L�L��6�	���w�w�|�|�4�U�4�G�4�H�#�f�s�5�z�1�O��G�G�H�������)G�G�H��G�G�H������h��)E�G�F�
�G�G�J�B�G�G�L�L��6�,J�G�K��G�G�J��G�4��G�G�$�e�G�4�O�R�l�l�?�+�+�� � �����O�,1�!�3�3��|�|�w�&��%�%�'8�/�&J�K��&�&�&��%�%�h�/��$�$�Y�/�� � ��[� �A�� � ��u� �=�� � ����� �@�� � ��� �;�3�,� $�F����f�%�%�t�'9�'9�#�(�(�*�V�'9�'T�'T��+�+�W�h�,?�@���c�7�+�+��|�|�w�.��
�
�c�l�l�K�@��(�(����E�4F�4F�G�(U�%�%�$�s�^�^��T3�3�3��,�+�+��"(U�'T��%�%�%�s��R�R�H0R�+R*�R	�-R	�BR	�R*�4*S	�1R>
�R>
�%AR>
�,S	�R	�R	�R'
�R'
�!	R*�*R;	�3R;	�>S�S�	S	�S#
�S#
c�8�[29^tt^2oUOQQQ5UOQQQ5UOQ2PPP2UOWO2Q29^tt^2[O
2%c9UO
QQQ5UO
QQQ5UO
Q2L"UO
Q	2UO
Q2PPP2UOUO2Q
29^tt^2[O
2%c"UO[OQ2L"UO
Q	2UO
Q2PPP2UOUO2Q29^tt^2[O
2%cUUO%c"UO[OQ2LCUO[OQ
2L"UO
Q	2UO
Q2PPP2P!)%fhCK
9h)%fhCKx9h)%fhK�9h)%fhP!9h)r�r�rDzcurrent/parentr�rrrrgzcurrent/rWrrzS'current/parent' would link to ['"].*outerdir['"], which is outside the destination)rHr�r�r,rr�rr
r-rr�rr s& r�test_parent_symlink2�*TestExtractionFilters.test_parent_symlink2s���
�^�^�s�
�G�G�I�#�G�.�
�G�G�$��G�6��G�G�M�"���
�
����
�O�
<�
<��$�$�&�&�� � ��s� �;�� � ��d� �;�� � ��+�� � ��,�� � ��/�=��
�
����
�E�
2�
2��$�$�&�&��%�%��7�7�,�-�� � ��,�� � ��/�3��
�
����
�F�
3�
3��$�$�&�&��-�-�-��)�)�#�;�;�0�1��)�)�#�?�?�0�1�� � ��,�� � ��/�%4�
3�C�^�^��=�
<�
<��3�
2��4�
3�
3�sb�8I
�<I!�AI!�"I5�>AI5�1J�
J�A$J�
I	�I	�!I2	�*I2	�5J	�>J	�J	�J	c���[29^tt^2oUOQUOQ5UOQ2PPP2UOWO	2Q29^tt^2[
O2%c0UOQUOQ5UOQ2LUOQ2PPP2UOUO	2Q29^tt^2[
O2%c"UO[OQ2LUOQ2PPP2UOUO	2Q29^tt^2UO[OQ2PPP2P!)%fhCKn9h)%fhK�9h)%fhK�9h)%fhP!9h)	rrDrrrgrWr�&'parent' is a link to an absolute pathr)rHr�r�r�r,rr�rr
r-r�AbsoluteLinkErrorr s& r�test_absolute_symlink�+TestExtractionFilters.test_absolute_symlinkAsT���^�^�s��G�G�H����G�7��G�G�M�"���
�
����
�O�
<�
<��$�$�&�&�� � ��d�m�m� �D�� � ��+�� � ��/�=��
�
����
�E�
2�
2��$�$�&�&��%�%��7�7�,�-�� � ��/�3��
�
����
�F�
3�
3��!�!��)�)�8�
:�4�
3�+�^�^��=�
<��3�
2��4�
3�
3�sT�/F(�3F<�AF<�?G�2G�=!G"�(F9	�1F9	�<G	�G	�G	�G	�"G3	�+G3	c�V�[29^tt^2oUOQQQ5PPP2UOWO2Q29^tt^2UO	Q[
OQ5[OOUOQ*2o[OU2o[OQ6XcUOUQ2LUOUQ2PPP2P!)%fhK�9h)%fhP!9h)r�zrelative/test/pathrDrrr�zrelative\test\path)rHr�r�r,rr-rr{r|r�r�r�r�rl)r!rJ�	link_pathr�s&   r�0test_symlink_target_seperator_rewrite_on_windows�FTestExtractionFilters.test_symlink_target_seperator_rewrite_on_windows_s����^�^�s��G�G�F�';�G�<���
�
����
�O�
<�
<����V�'�/�/��:����(�(�����)>�?�I��+�+�i�0�K��w�w�$��� � ��.D�E�� � ��.B�C�=�
<��^��=�
<�
<�s*�D�A<D�%D�D	�
D	�D(	� D(	c���[29^tt^2oUOQUOQ*Q5PPP2UOWO	2Q29^tt^2UO[Q2PPP2UOUO	2Q29^tt^2UO[Q2PPP2UOUO	2Q29^tt^2UO[OQ2PPP2P!)%fhK�9h)%fhK�9h)%fhK�9h)%fhP!9h)rrYr*rz.*foo. not foundrWrrE)	rHr�r�r�r,r
r�r-rFr s& r�test_absolute_hardlink�,TestExtractionFilters.test_absolute_hardlinkns����^�^�s��G�G�H�$�-�-�%�*?�G�@���
�
����
�O�
<�
<��!�!�(�,>�?�=��
�
����
�E�
2�
2��!�!�(�,>�?�3��
�
����
�F�
3�
3��!�!��)�)�8�
:�4�
3��^��=�
<��3�
2��4�
3�
3�sG�%D"�)D5�0E�7!E�"D2	�+D2	�5E	�>E	�E	�E	�E,	�$E,	c	���[29^tt^2oUOQQQ5PPP2UOWO2QQ59^tt^2[O
2%cK[
UO[2%cUO[2LUOQQQ5LPPP2QFDToUOWO2U29^tt^2UO[OQ2PPP2JV	P!)%fhCK9h)%fhK�9h[cK�h9h)%fhJ�9h)�../mooz..//tmp/moorDrrvrzH'../moo' would be extracted to '.*moo', which is outside the destination)
rHr�r�r,rr�rr�r�r
rr-rrs&  r�test_sly_relative0�(TestExtractionFilters.test_sly_relative0s���^�^�s��G�G�H��G�7��	��#�#�C�H�H�J��#�G�G��(�(�*�*�!�$�"7�"7��I�I��-�-�o�>��(�(��m�(�L��H�&$�F��#�#�C�H�H�J��7�7��%�%��7�7�,�-�8�7�$�1�^�^��
H�G�� �	��	��8�7�7�sj�D&�)E
�D:�6D:�+D:�E
�7!E	�&D7	�/D7	�:E
	�E
	�E
�
E
�
	E�E�E�E/
�'E/
c	��[29^tt^2oUOQ2UOQQQ5PPP2UOWO2Q29^tt^2UO	Q[
OQ5[O2%cUO	QQQ5PPP2Q	FDToUOUO2U29^tt^2UO[
OQ
2PPP2JV	P!)%fhK�9h)%fhK�9h)%fhJ�9h)ztmp/z
tmp/../../mooztmp/../..//tmp/moorDr�tmprrQztmp/../../tmp/moorzU'tmp/../../moo' would be extracted to ['"].*moo['"], which is outside the destination)rHr�r�r,rr-r�rr�r
rrs&  r�test_sly_relative2�(TestExtractionFilters.test_sly_relative2�s����^�^�s��G�G�F�O��G�G�O�0D�G�E���
�
����
�O�
<�
<����U�����9��$�$�&�&�� � ��6I� �J�=�
$�F��#�#�C�H�H�J��7�7��%�%��3�3�$�%�8�7�$��^��=�
<��8�7�7�s;�%D�)<D1�&D1�/!E	�D.	�'D.	�1E	�:E	�E
�
E
c��[UOO2]*oQOQ[	U222oQQU**Q*oQ	FD�oUOU29^tt^2[
29^tt^2oUOQUQ5UOQ
-VC-@PPP2UOWO2Q29^tt^2UO[O2PPP2PPP2J�	P!)%fhKn9h)%fhK19h)%fhJ�9h)r�r�c3�8�SF �DoQU0w�	J
	P!3h)rQr$)rPr{s& rrR�HTestExtractionFilters.test_normpath_realpath_mismatch.<locals>.<genexpr>�s������A�!�A�3���s��a/�../r�r�rDr)rEr�)r()
rmr��partsr}r�r�rHr�r�r,r
r-r)r!�depthr;�sneaky�kindrJs&     r�test_normpath_realpath_mismatch�5TestExtractionFilters.test_normpath_realpath_mismatch�s����D�L�L�&�&�'�!�+���x�x�6��u��6�6�����
�%��.��/�D����d�#�#�!�^�^�s��G�G�C�D�G�1��G�G�7���7�$��'�'����
�F�;�;��)�)��;�;�=�<�	$�#�0�#�^��<�;��	$�#�#�sN�>E	�(D
�90E	�) D2
�	E	�D/�(D/�*E	�2E�;E�=E	�E
�E
c���[29^tt^2o[OQ2o[OUmQUmUOOU2UOQQQ5PPP2UOWO2Q29^tt^2UO[O2PPP2P!)%fhKb9h)%fhP!9h)zx/r�z	x/escaped�hir,r)
rHr-r_rr�rr�rgr�r�r,r
r)r!rJrjs&  r�test_symlink_trailing_slash�1TestExtractionFilters.test_symlink_trailing_slash�s���
�^�^�s�����%�A��_�_�A�F��A�J��I�I���a� ��G�G�K��G�.���
�
����
�F�
3�
3��!�!�'�"E�"E�F�4�
3��^��4�
3�
3�s$�A!C�% C"�C	�C	�"C3	�+C3	c	���QFD�o[29^tt^2o[OU2o[OUmQUmUOOU2PPP2UOWO2Q29^tt^2UO[O2PPP2J�	P!)%fhKf9h)%fhJ�9h)�r�r)rhr�r�)rHr-r_rr�rr�rgr�r,r
r)r!r�rJrjs&   r�test_link_at_destination�.TestExtractionFilters.test_link_at_destination�s���"�D����3��O�O�D�)�� ����� ��
��	�	�!�!�!�$�	 ��#�#�C�H�H�J��7�7��%�%�g�&E�&E�F�8�7�"����8�7�7�s$�AC	� C	�C
�C
�C*
�"C*
c��[29^tt^2oQFDQvq#[OU2o[OUmV4mUOOU2JS	UOQQQ5PPP2UOWO2Q29^tt^2UO[O2PPP2P!)%fhKb9h)%fhP!9h)rh�escapedrdr,r))rhrh)r[r��rh�dummy)rhr�)�b/r�rm)rhza/b)
rHr-r_rr�rr�rgr�r�r,r
�FilterError)r!rJr�rSrjs&    r�test_empty_name_symlink_chain�3TestExtractionFilters.test_empty_name_symlink_chain�s���
�^�^�s�!=����O�O�D�)�� �����#�
��	�	�!�!�!�$�!=�
�G�G�I�t�G�,���
�
����
�F�
3�
3��!�!�'�"5�"5�6�4�
3��^��4�
3�
3�s$�A,C�0 C-�C*	�#C*	�-C>	�6C>	c
��[29^tt^2oUOQ]Q5UOQ[OO	QQ2Q5UOQ[OO	QQQ2Q5PPP2QFD�oUOWO
2U29^tt^2UOQ]Q5UOQ]Q5[O2%cUOQ]Q	Q
5LUOQ]Q5PPP2J�	P!)%fhK�9h)%fhJ�9h)�targetdir/targetr��linkdir/hardlink�	targetdirrSr*�linkdir/symlinkr�rDz../targetdir/target�rnrE�rWrr�
rHr�r{r|r}r�r,rrr�rs&  r�test_deep_symlink�'TestExtractionFilters.test_deep_symlink�s��
�^�^�s��G�G�&�Q�G�/��G�G�&�B�G�G�L�L��X�5'�G�
(�
�G�G�%�"�'�'�,�,��k�8�3-�G�
.�
�5�F��#�#�C�H�H�J��7�7�� � �!3�!� �<�� � �!3�!� �<��(�(�*�*��$�$�%6�Q�0E�%�G��$�$�%6�Q�$�?�8�7�5��^��8�7�7�s+�A7D9�AE	�(E	�9E		�E		�E
�E
c
��[29^tt^2oUOQQQ5UOQ[OO	QQ2Q5UOQ]Q5UOQ[OO	Q	Q
2Q5UOQ[OO	QQ
2Q5PPP2QFD�oUOWO
2U29^tt^2UOQ]Q5UOQ]Q5UOQ]Q5[O2%c*UOQ]QQ5UOQ]QQ5L&UOQ]Q5UOQ]Q5PPP2J�	P!)%fhK�9h)%fhCJ9h)rw�hardlinkrD�symlink2�linkdir�	hardlink2rtr�rurvrSr*zlinkdir/hardlink2rWrxryrzrs&  r�test_chains�!TestExtractionFilters.test_chainss����^�^�s��G�G�%�*�G�=��G�G�J�2�7�7�<�<��;�,(�G�
)��G�G�&�Q�G�/��G�G�&�B�G�G�L�L��h�4W�G�X��G�G�'�R�W�W�\�\�)�Y�5W�G�X�
�5�F��#�#�C�H�H�J��7�7�� � �!3�!� �<�� � �!3�!� �<�� � �!4�1� �=��(�(�*�*��$�$�%6�Q�0:�%�<��$�$�Z�a�0C�%�E��$�$�%6�Q�$�?��$�$�Z�a�$�8�8�7�5��^��8�7�7�s,�B:F6�AG		�AG		�6G	�?G	�	G
�G
c�X�[29^tt^2oUOQ2UOQ2UOQ[OO	QQ2Q5UOQ[OO	QQQ2Q5UOQQ	Q5UOQ
[OO	QQ2Q5PPP2UOWO
2Q
29^tt^2[O2%f!UO[O2L[OQ6Xc!UO[O2LJUO[OQ2oUOUO [O2PPP2QFCDoUO#U29^tt^2UOUO
2U29^tt^2[O2%f5UO%Q2UO%Q2UO%Q2L[UO%Q2UO%Q2UO%QQQ5UO%Q
QQ5UO%QQ	Q5PPP2PPP2CJ	P!)%fhCK9h)%fhCK09h)%fhKG9h)%fhCJU9h)z	a/t/dummyro�cr�rjrDzc/escaper��	link_herer��boomr(r*rrzc/z
a/t/escapez../../link_herezJlink 'boom' would be extracted as a copy of 'c/escape', which was rejected�rWr)rHr�r{r|r}r�r,rr�r
r-rrr
�LinkFallbackErrorr��	__cause__r�r�r!rJr�rws&   r�test_sneaky_hardlink_fallback�3TestExtractionFilters.test_sneaky_hardlink_fallback.sE��
�^�^�s�
�G�G�K� ��G�G�D�M��G�G�C�B�G�G�L�L��c�$:�G�;��G�G�J�2�7�7�<�<��d�8C�,E�G�
F�
�G�G�C�C�G�(�
�G�G�F������S�(�(C�G�D��"�
�
����
�F�
3�
3��(�(�*�*��%�%��7�7�9�����(��%�%�g�&I�&I�J��)�)��-�-�7�8���%�%�a�k�k�&-�&I�&I�K�4�"-�F����f�%�%�t�'9�'9�#�(�(�*�f�'M�'M� �,�,�.�.��$�$�[�1��$�$�T�*��$�$�T�*��$�$�[�1��$�$�T�*��$�$�\�>O�$�P��$�$�V�8I�$�J��$�$�S�S�$�9�(N�%�%�-�E�^�^��"4�
3�
3��$(N�'M��%�%�%�sh�C
K�K0�*4K0�A*K0�1)L	�L
�6BL
�L	�K-	�%K-	�0L	�9L	�L�
L�L	�L)
� L)
c
��[29^tt^2oUOQ[OO	QQ2Q5UOQ[OO	QQQ2Q5PPP2UOWO
2Q29^tt^2UO[OQ2oUOUO[O2PPP2QFD�oUOU29^tt^2UOUO
2U29^tt^2[O2%f$UO!Q	2UO!Q
2LbUO!Q[OO	QQ2Q5UO!Q[OO	QQ2Q5PPP2PPP2J�	P!)%fhCK�9h)%fhCK$9h)%fhKF9h)%fhCJI9h)
za/b/sr�r(rDr�r�r�r*rr[za/b/zDlink 's' would be extracted as a copy of 'a/b/s', which was rejectedr�)rHr�r{r|r}r�r,r
r-r�r�r�rr�rr�rr�s&   r�"test_sneaky_hardlink_fallback_deep�8TestExtractionFilters.test_sneaky_hardlink_fallback_deepbs����^�^�s��G�G�G������T�8�(D�G�E��G�G�C�R�W�W�\�\�#�s�C�%@�G�A���
�
����
�F�
3�
3��%�%��)�)�0�1�A�
�!�!�!�+�+�")�"E�"E�
G�4�-�F����f�%�%�t�'9�'9�#�(�(�*�f�'M�'M� �,�,�.�.��$�$�T�*��$�$�V�,��$�$�W������d�H�9U�$�V��$�$�S�R�W�W�\�\�$��5Q�$�R�
(N�%�%�-��^�^��4�
3�
3��(N�'M��%�%�%�s\�A$G:�(AH�)H5	�H"
�BH"
�$H5	�:H	�H	�H	�H	�"H2�+H2�-H5	�5I
�>I
c�L�[29^tt^2oUOQ[OO	QQQQQ2Q5UOQQQ5PPP2QFD�oUOWO
2U29^tt^2[O2%cCUOQQQ5UQ6XcUOQQQ5LUOQQQ5LPPP2J�	P!)%fhK�9h)%fhJ�9h)	r(r�r�z	link-hererDr�rzlink/link/../../link-herery)
rHr�r{r|r}r�r,rr�rrs&  r�test_exfiltration_via_symlink�3TestExtractionFilters.test_exfiltration_via_symlinkzs����^�^�s��G�G�H������f�f�d�D�R]�)^�G�_��G�G�F�t�G�,��5�F��#�#�C�H�H�J��7�7��(�(�*�*��$�$�V��$�=���'��(�(��k�(�J��(�(��4O�)�Q��8�7�5�	�^��
8�7�7�s0�AC?�D	�.D	�)D	�?D	�D	�D#
�D#
c	�H�[29^tt^2oUOQQQ5UOQQQ5UOQQQ5UOQQQ5PPP2QFCDoUOWO2U29^tt^2o[O
2%fUO
Q2LTUQ	6Xc(UO
QQQ5UO
QQQ5L&UO
QQQ5UO
QQQ5[OQ
6wc>UOO2OoUOUQ*Q2PPP2CJ	P!)%fhCK#9h)%fhCJ59h)
za/pwnr�rDza/pwn/r'r�zx/../za/xr\rrrry)
rHr�r�r,rr�rrr
r�rrrC)r!rJrw�ccrs&    r�test_chmod_outside_dir�,TestExtractionFilters.test_chmod_outside_dir�sD��
�^�^�s��G�G�G��G�,�
�G�G�H�<�G�0��G�G�G��G�0�
�G�G�E�u�G�.��5�F��#�#�C�H�H�J��7�7�2� �,�,�.�.��$�$�X�.��v�%��$�$�U�u�$�=��$�$�W��$�=��$�$�U�u�$�=��$�$�W��$�A��<�<�7�*� �k�k�.�.�0�8�8�G��'�'��%���?�8�7�5��^�^��8�7�7�s7�A
E;�F	�4F	�
A!F	�/=F	�;F	�F	�F!
�F!
rr�lchownzmissing os.lchownrr�	link_typec���[29^tt^2oUOQQQPPQQ5UOQUQQQPPQQ5PPP2[O29^tt^2oWO	29^tt^2o[
OOQ29^tt^2o[
OOQ29^tt^2o[
OOQ29^tt^2o]UmUOQUQ	Q
5[OOUQ2oU[O6Xc%UO2UO!UPP2LaUO#[
OO%UPP2[
OO%UPP2,2UO2PPP2PPP2PPP2PPP2PPP2P!)%fhCK�9h)%fhKF9h)%fhKQ9h)%fhK\9h)%fhKg9h)%fhP!9h�ztest.txti9z
-rwxr-xr-x)r�r�r�r�r"r�)r�rr�r�r�r�r"rz	os.lchownrrr-)rHr�rrr,r�rrr�ryr{r|r}r-rr$�assert_called_once_withrr)	r!r�rJ�tmpdirrWr�mock_lchownr�extract_paths	&&       r�test_chown_links_on_extract�1TestExtractionFilters.test_chown_links_on_extract�s����^�^�s��G�G�J��$�b���
�
O��G�G�F�"�'��$�b���
�
O��
��� � �F��H�H�J�J�#��M�M���
�+�+�z��M�M����,�,���M�M����-�-��)*�L�%��K�K��V�F�K�;��7�7�<�<���7�L��G�O�O�+��,�,�.��3�3�L�"�b�I��+�+��M�M�&�&�|�R��<��M�M�&�&�|�R��<�-���-�-�/�
.�
-�
,�
�
!� ��^�^��
.�-��
-�,��
,�+��
�J��
!� � �s��1G;�*I�(I	�+(H5
�(H"�;AH�BH�H"�H5
�!I	�)I�;H	�H	�H�H�H"�"H2�+H2�-H5
�5I�>I�I	�I
�I
�I�I,	�$I,	c�"�[29^tt^2oUOQQQPPQQ5UOQUQQQPPQQ5PPP2[O29^tt^2oWO	29^tt^2o[
OOQ29^tt^2o[
OOQ29^tt^2o[
OOQ29^tt^2o]UmUOUQ	Q
5[OOUQ2o[OOUQ2o	U[O6Xc(UOU	PP2UOUPP2LaUO![
OO#U	PP2[
OO#UPP2,2UO%2PPP2PPP2PPP2PPP2PPP2P!)%fhCK�9h)%fhKF9h)%fhKQ9h)%fhK\9h)%fhKg9h)%fhP!9hr�)rHr�rrr,r�rrr�rr{r|r}r-rr�rrr$)
r!r�rJr�rWrr�r�extract_link_path�extract_file_paths
&&        r�test_chown_links_on_extractall�4TestExtractionFilters.test_chown_links_on_extractall�s����^�^�s��G�G�J��$�b���
�
O��G�G�F�"�'��$�b���
�
O��
��� � �F��H�H�J�J�#��M�M���
�+�+�z��M�M����,�,���M�M����-�-��)*�L�%��N�N��v�N�6� "�����V�V� <�� "�����V�Z� @���G�O�O�+��2�2�3D�b�"�M��3�3�4E�r�2�N��+�+��M�M�&�&�'8�"�b�A��M�M�&�&�'8�"�b�A�-���-�-�/�!
.�
-�
,�
�
!� ��^�^��
.�-��
-�,��
,�+��
�J��
!� � �s��1H�*I=�(I*	�+(I
�(I�;A/H1�+BH1�3I�;I
�I*	�I=�H.	�&H.	�1I�:I�<I�I�
I�I
�I'� I'�"I*	�*I:
�3I:
�5I=�=J	�J	c
��[29^tt^2oUOQ2UOQQQ5PPP2Qo[O[2Q*o[
OU29^tt^2WO29^tt^2oUOQV2Q5UQ*o[
O2%c?UOUO2O[O*2PPP2PPP2P!)%fhK�9h)%fhK-9h)%fhP!9h)rSr�r*c��UOQ6Xc!UO[OQ5!UOPQ5!)rSr�)r�rFrr�)r�r|s&&r�testing_filter�ITestExtractionFilters.test_extract_filters_target.<locals>.testing_filters4���{�{�h�&��~�~�4�<�<�~�8�8��>�>�t�>�,�,rryr-)rHr�rrrzrrr,ryr�r6rrr�)r!rJr�r�rWr|s&     r�test_extract_filters_target�1TestExtractionFilters.test_extract_filters_target�s����^�^�s��G�G�H���G�G�F��G�1��	-��,�,�w�'�)�3��
�
�
��
(�
(�#�(�(�*�*���K�K��W�K�D��V�#�D��"�"�$�$�� � �����!4�!4�t�|�|�!C�D�	+5�
(�
(��^��+5�*��
(�
(�
(�sG�%D$�E
�7D7	�>D7	�E
�$D4	�-D4	�7E
�E
�E
�
E	�E	c	��[29^tt^2oUOQ2UOQ2UOQQQ5UOQQQ5PPP2QFDxoUOWO2U29^tt^2oUO	Q2UO	Q2UO	Q2UO	Q2PPP2Jz	P!)%fhK�9h)%fhJ�9h)�dir/zdir/../afile�link1r*�link2zdir/../dir/../afile�afileryr)r!rJrwr�s&   r�test_link_fallback_normalizes�3TestExtractionFilters.test_link_fallback_normalizes
s����^�^�s��G�G�F�O��G�G�N�#��G�G�G��G�8��G�G�G�)>�G�?�	�5�F��#�#�C�H�H�J��7�7�2�� � ��(�� � ��)�� � ��)�� � ��)�	8�7�5�
�^��8�7�7�s%�A	C&�AC9	�&C6	�/C6	�9D

�D

c���[29^tt^2oUOQQQ5UOQQQ5UOQQQ5UOQQQ5UOQ	Q
Q5UOQQQ5UOQ
QQ5PPP2[OO	[
Q2o[
UQ29^tt^2PPP2[OU2O[O*[O*[O*o[OV#2[OU2OoU[O*%cQLQoU[O*%cQLQoU[O*%cQLQo[O"U2[O$U2[OU2O[O*[O*[O*o[OV#2[OU2OoU[O*%cQLQo	U[O*%cQLQo
U[O*%cQLQo[O&U2UO)WO
2Q29^tt^2UO+QQUQUQU0Q5UO+QQQ5UO+QQQ5UO+QQQ5UO+Q	Q
Q5UO+QQUQU	0Q5UO+Q
QU
QUQU	0Q5PPP2UO)UO
2Q29^tt^2UO+QQQ5UO+QQQ5UO+QQQ5UO+QQQ5UO+Q	Q
Q5UO+QQQ5UO+Q
QQ5PPP2UO)UO
2Q29^tt^2[O,[O.UO0O2O22oUO+QQQ5UO+QQQ5UO+QQQ5UO+QQQ5UO+Q	Q Q5UO+QUQ5UO+Q
UQ5PPP2P!)%fhCK9h)%fhCK�9h[c>oSO[[Q]26XcSO!Q2Po=CK�gPo=hh9h[O"S2h9h)%fhCKY9h)%fhCK�9h)%fhP!9h)!�all_bitsrFr��	perm_bitsz
?rwxrwxrwx�exec_group_otherz
?rw-rwxrwx�read_group_onlyz
?---r-----�no_bitsz
?---------r�z
?---rwsrwtz
dir_all_bits/ztmp.filer��EFTYPEz?chmod() failed with EFTYPE: regular users cannot set sticky bitrjr�r�rz?rwr�z?---rwrWz
?rwxr-xr-xz
?rw-r-xr-xz
?---r-xr-xrz
?rw-r--r--z
?rw-r-----z
?rw-------)rHr�r{r|r}rzr,rrr�r�r�r8r�r4r�r�r�r�r�r�rr#r�r�)
r!rJ�tmp_filename�new_moder��got_mode�_t_file�
_suid_file�
_sgid_file�_t_dir�	_suid_dir�	_sgid_dir�normal_dir_modes
&            r�
test_modes� TestExtractionFilters.test_modess���^�^�s��G�G�J�\�G�2��G�G�K�l�G�3��G�G�&�\�G�:��G�G�%�L�G�9��G�G�I�L�G�1��G�G�F��G�.��G�G�O�,�G�7���w�w�|�|�G�Z�8��
�,��
$�
$��%�	$�����-�5�5��,�,�'�)-���6�8<���E�H�	
�����0��w�w�|�,�4�4�H�&����5�5�c�C�G�!)�D�L�L�!8�!8��s�J�!)�D�L�L�!8�!8��s�J��I�I�l�#�
������G�G�L�)�1�1��l�l�#�%)�\�\�2�48�L�L�A��
����(��7�7�<�(�0�0��!�D�L�L�0�0��s��$�t�|�|�3�3�C�#�	�$�t�|�|�3�3�C�#�	�
�����
�
�
����
�O�
<�
<����Z�$'�
�|�2�j�\��G�9�"M�
�
O����[�|��<����/�l��C����.�\��B����Y�\��:����V�F�9�+�R��x�*H��I����_�$'�	�{�"�Y�K�r�&��"J�
�
L�=��
�
����
�E�
2�
2����Z�l��;����[�|��<����/�l��C����.�\��B����Y�\��:����V�,��7����_�<��@�3��
�
����
�F�
3�
3�"�m�m�D�L�L��
�
�"�"�$�,�,�-.�/�O����Z�l��;����[�|��<����/�l��C����.�\��B����Y�\��:����V�/��:����_�?��C�4�
3�E�^�^��%�
$�
$���
��9�9���x�� ;�;��M�M�#H�I�I���
��
�I�I�l�#��=�
<�
<��3�
2�
2��4�
3�
3�s��BV �V4�%AX�W�<X� X�9 X�X�BX.�BY�CY� V1	�)V1	�4W	�=W	�	X�X�X�3X�X�
X�X�X�X+�.X?	�7X?	�Y	�Y	�Y'	�Y'	c	��[29^tt^2oUOQ[OQ5PPP2QFDmoUO	WO2U29^tt^2[
[Q2%c#UOQ[OQ5LPPP2Jo	UO	WO2Q29^tt^2UO[OQ2PPP2P!)%fhK�9h)%fhJ�9h)%fhP!9h)rYr�mkfiforz'foo' is a special file)rrW)rHr�r-rr�r,r�r{rr
�SpecialFileErrorrs&  r�	test_pipe�TestExtractionFilters.test_pipems���
�^�^�s��G�G�E�� 0� 0�G�1��-�F��#�#�C�H�H�J��7�7��2�x�(�(��$�$�U��1A�1A�$�B��8�7�-��
�
����
�F�
3�
3��!�!��(�(�)�
+�4�
3��^��8�7�7��4�
3�
3�s;�"D�,D	�#D	�!D,�D	�D	�D)
�!D)
�,D=	�5D=	c	���[O[O[O1FCD&o[OQ2oVm[OUP2oUOV22[OUP2oUOUO
U2UO[O29^tt^2o[OUP2PPP2UOWOO[O2UOUOOO Q2CJ)	P!)%fhK{9hr�)r-rrr�r_r�r"rtr!rlrUr�r r�r3rqr�)r!�special_typerq�trustedrWr]s&     r�test_special_files�(TestExtractionFilters.test_special_filess���$�,�,�g�o�o�w���N�L��o�o�e�,�G�'�L��2�2�7�B�?�G��M�M�'�+��$�$�W�b�1�C����S�X�X�|�4��"�"�7�#;�#;�<�<���#�#�G�R�0�=��!�!�"�,�,�"6�"6����H����R�\�\�1�1�6�6��>�O�=�<�s�E	�E/
�(E/
c��[OO[29^tt^2oUO	2FD+o[O
UP2oUO
V22J-	PPP2P!)%fhP!9h)rh)r-r.r,r)r r"rt�r!rWrq�filtereds&   r�test_fully_trusted_filter�/TestExtractionFilters.test_fully_trusted_filter�sW��
�_�_�
!�
!�'�
*�
*�c��>�>�+��"�7�7���D���
�
�h�0�,�+�
*�
*�
*�s�AA8�8B		�B		c��[OO[QQ59^tt^2oUO	2FDgo[O
UP2oUOUOUO2UOUOUO2Ji	PPP2P![cJ�h9h)%fhP!9h�rSr)
r-r.r,r)r r!�UnicodeEncodeErrorrtr�r�r�s&   r�test_tar_filter�%TestExtractionFilters.test_tar_filter�s����_�_�
!�
!�'�K�
!�
@�
@�C��>�>�+���&�1�1�'�2�>�H��
�
�h�m�m�W�\�\�:��
�
�h�m�m�W�\�\�:�
,�A�
@��*�����	A�
@�
@�s<�C�B6�AC�6	C�C�C�C�C�C	�C	c���[OO[QQ59^tt^2oUO	2FDgo[O
UP2oUOUOUO2UOUOUO2Ji	PPP2P![O[1cJ�h9h)%fhP!9hr�)r-r.r,r)r r rpr�rtr�r�r�s&   r�test_data_filter�&TestExtractionFilters.test_data_filter�s����_�_�
!�
!�'�K�
!�
@�
@�C��>�>�+���&�2�2�7�B�?�H��
�
�h�m�m�W�\�\�:��
�
�h�m�m�W�\�\�:�
,�A�
@�� �+�+�-?�@�����	A�
@�
@�s<�C�B6�AC�6C�C�C�C�C�C)	�!C)	rzrequires native bytes pathsc���[O[O2o[OUP2oUOUOUO2[OUP2oUOUOUO2[OQ2oUO[[OUP2UO[[OUP2[OQ2oUO[[OUP2UO[[OUP2P!)rhztest��)r-r_r�TESTFNr!rtr�r rUr�r�)r!rqr�s&  r�test_filter_unencodable�-TestExtractionFilters.test_filter_unencodable�s����/�/�)�"2�"2�3���%�%�g�r�2���
�
�h�m�m�W�\�\�2��&�&�w��3���
�
�h�m�m�W�\�\�2��/�/�*�-�����*�g�&8�&8�'�2�F����*�g�&9�&9�7�B�G��/�/�(�+�����,�g�.@�.@�'�2�N����,�g�.A�.A�7�B�Orc	��[QQQ59^tt^2oUOQ2PPP2[O29^tt^2oWO	QQ]Q5oUOUO
2Q,2UO[29^tt^2UO2PPP2UO[O2,2UO	QQ]]Q5o[O29^tt^2oUO2PPP2UO[O2,2UOQ	WO22PPP2P!)%fhCKY9h)%fhK�9h)%fhK�9h)%fhP!9h)
r�r�rcu	���rW�
surrogatepass)rUr\r�r�)rUr\r��debugztarfile: UnicodeEncodeError )rHr�rr�r,rlrGrUr�rr{�listdirr�captured_stderrrr)r!rJrUrW�stderrs&    r�test_extract_unencodable�.TestExtractionFilters.test_extract_unencodable�s<���7�3D�
E�
E���G�G�(�)�F�
�
�
�
!�
!�S��(�(�G�O�&'��)�C����S�\�\�^�h�Z�8��"�"�#5�6�6���� �7����R�Z�Z�\�2�.��(�(�G�O�&'�q��2�C��(�(�*�*�f���� �+����R�Z�Z�\�2�.��M�M�8�&�/�/�:K�L�"�
!�F�
E�
E��7�6��+�*��"�
!�
!�sb�E9�AF3�!F
	�2AF3�F 	�"A
F3�9F
	�F
	�
F
�F
�F3� F0
�)F0
�+F3�3G	�<G	c���[O[Q2oQoV!mUO	UP29^tt^2UOQ2PPP2P!)%fhP!9h)rxc�.�UOQ6XcU!P!�rgr��rqr|s&&r�
strict_filter�STestExtractionFilters.test_change_default_filter_on_instance.<locals>.strict_filter�����|�|��.���rrg)r-r.r)rUr�r)r!rWr�s&  r�&test_change_default_filter_on_instance�<TestExtractionFilters.test_change_default_filter_on_instance�sO���o�o�g�s�+��	�
!.��
�
�
��T�
*�
*����_�-�+�
*�
*�
*�s�A�A-	�%A-	c	�z�Qo[O[Q2o[O[OQ[U229^tt^2UO
UP29^tt^2UOQ2PPP2PPP2P!)%fhK9h)%fhP!9h)c�.�UOQ6XcU!P!r�r�r�s&&rr��PTestExtractionFilters.test_change_default_filter_on_class.<locals>.strict_filter�r�rrxrUrg)r-r.r)rrrmr�r)r!r�rWs&  r�#test_change_default_filter_on_class�9TestExtractionFilters.test_change_default_filter_on_class�s���	�
�o�o�g�s�+��
�
�
�w���0C�+�M�:�<�<��#�#�C��.�.�� � ��1�/�<�<�.�.��<�<�<�s0�B)�2B	�B)�B&
�B&
�!B)�)B:	�2B:	c���QQ[O2oU[Q2oUOUP29^tt^2UO	Q2PPP2P!)%fhP!9h)c�(`�\sQsQsnQsQsUsP!)�QTestExtractionFilters.test_change_default_filter_on_subclass.<locals>.TarSubclassi�c�.�UOQ6XcU!P!r�r��r!rqr|s&&&rrU�cTestExtractionFilters.test_change_default_filter_on_subclass.<locals>.TarSubclass.extraction_filter�s���<�<�?�2�"�N�rr$)r%r&r'r(rUr1r2r3s@r�TarSubclassr��s����
 �
 rr�rxrg)r-r.r)r�r)r!r�rWs&  r�&test_change_default_filter_on_subclass�<TestExtractionFilters.test_change_default_filter_on_subclass�sP��	 �'�/�/�	 ��'�3�'��
�
�
��T�
*�
*����_�-�+�
*�
*�
*�s�A�A/	�'A/	c���[O[Q2oQUmUO	UP29^tt^2UO[2PPP2P!)%fhP!9h)rxr)r-r.r)rUr�r
r�rJs& r�$test_change_default_filter_to_string�:TestExtractionFilters.test_change_default_filter_to_string�sJ���o�o�g�s�+�� &���
�
�
��T�
*�
*��!�!�)�,�+�
*�
*�
*�s�A�A/	�'A/	c�`�U1Qko[29^tt^2oUOQ2UOQ2UOQ2PPP2ROWO2U29^tt^2RO	Q2RO	Q2PPP2P!)%fhKe9h)%fhP!9h)c�:�ROURO2UOQ6XcUOQQ5!UOQ6XcP!U!)�	move_this�movedr��ignore_this)rtr�r�rF)rqr|r!s&&�r�
custom_filter�?TestExtractionFilters.test_custom_filter.<locals>.custom_filter�sF����M�M�$����-��|�|�{�*����G��4�4��|�|�}�,���Nrr	r		�keepr	r)r!r
	rJsf  r�test_custom_filter�(TestExtractionFilters.test_custom_filter�s����	��^�^�s��G�G�K� ��G�G�M�"��G�G�F�O���
�
����
�M�
:�
:����W�%����V�$�;�
:�	�^��;�
:�
:�s#�4B,�?#B?�,B<	�5B<	�?C	�C	c�:�[29^tt^2oUOQ2PPP2UOWO2Q29^tt^2UO	[
2PPP2P!)%fhKX9h)%fhP!9h)rYzbad filter name)rHr�r�r,r
r�r s& r�test_bad_filter_name�*TestExtractionFilters.test_bad_filter_name
s]��
�^�^�s��G�G�E�N��
�
�
����
�,=�
>�
>��!�!�*�-�?�
>��^��
>�
>�
>�s#�A6�B	�6B	�?B	�	B	�B	c	�R�QQ2o[29^tt^2oUOQ2UOQQQ5UOQ2PPP2U29^tt^2oUOWO2U29^tt^2UO	Q2PPP2PPP2UOWO]2UOUOP	2P!)%fhK�9h)%fhKe9h)%fhKp9h)c�4`�\sQsQsnQsQsQsQsUsP!)�BTestExtractionFilters.test_stateful_filter.<locals>.StatefulFilteric��]UmU!r�)�num_files_processedr s&rr��LTestExtractionFilters.test_stateful_filter.<locals>.StatefulFilter.__enter__s��+,��(��rc��[OV2oU9O]*
tmU![OcP!h9hr
)r-r rpr	r�s&&&r�__call__�KTestExtractionFilters.test_stateful_filter.<locals>.StatefulFilter.__call__sI�� �%�1�1�'�@�G��(�(�A�-�(�����*�*� �� �s�4�A
�A
�A
c��P	UmP!)T)�done)r!�exc_infos&*rr��KTestExtractionFilters.test_stateful_filter.<locals>.StatefulFilter.__exit__$s	�� ��	r)r	r	)	r%r&r'r(r�r	r�r1r2r3s@r�StatefulFilterr	s����
�
�
!�
!rr	�good�badr�rD)rHr�r�r,rrlr	r	)r!r	rJr
	s&   r�test_stateful_filter�*TestExtractionFilters.test_stateful_filters���	!�	!� �^�^�s��G�G�F�O��G�G�E�c�G�*��G�G�F�O���
�
���#�#�C�H�H�J�
�>�>�� � ��(�?��	
����:�:�A�>�����+�+�T�2��^��
?�>���
�sA�6C0�+)D�D	�&D�0D	�9D	�D
�D
�D�D&	�D&	c��QoQoQoQoQo[29^tt^2oUOQ2PPP2UOWO]Q5U29^tt^2PPP2UOUO]Q5U29^tt^2PPP2UOUO]Q5U29^tt^2PPP2UOUO]Q5U29^tt^2UO	[
O2PPP2UOUO]Q5U29^tt^2UO	[2PPP2UOUO]Q5U29^tt^2PPP2UOUO]Q5U29^tt^2UO	[
O2PPP2UOUO]Q5U29^tt^2UO	[2PPP2UOUO]Q5U29^tt^2UO	[
O2PPP2UOUO]Q5U29^tt^2UO	[2PPP2UOUO]Q5U29^tt^2UO	[
O2PPP2UOUO]Q5U29^tt^2UO	[
O2PPP2UOUO]Q5U29^tt^2UO	[2PPP2UOUO]Q5U29^tt^2UO	[
O2PPP2UOUO]Q5U29^tt^2UO	[2PPP2UOUOQQ5U29^tt^2UO	[2PPP2P!)%fhCK9h)%fhCK_9h)%fhCK?9h)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCKO9h)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhCKk9h)%fhCK-9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhP!9h)c�0�[OQ2g)zfailed with ExtractError)r-�ExtractErrorr�s&&r�extracterror_filter�BTestExtractionFilters.test_errorlevel.<locals>.extracterror_filter2s���&�&�'A�B�Brc�0�[OQ2g)zfailed with FilterError)r-rpr�s&&r�filtererror_filter�ATestExtractionFilters.test_errorlevel.<locals>.filtererror_filter4s���%�%�&?�@�@rc��[Q2g)zfailed with OSError)r�r�s&&r�oserror_filter�=TestExtractionFilters.test_errorlevel.<locals>.oserror_filter6s���/�0�0rc�0�[OQ2g)zfailed with base TarError)r-�TarErrorr�s&&r�tarerror_filter�>TestExtractionFilters.test_errorlevel.<locals>.tarerror_filter8s���"�"�#>�?�?rc��[Q2g)zfailed with ValueError)r�r�s&&r�valueerror_filter�@TestExtractionFilters.test_errorlevel.<locals>.valueerror_filter:s���5�6�6rrzr�zboo!)rHr�r�r,r
r-r0	r�rpr�r&	r�)r!r'	r*	r-	r1	r4	rJs&      r�test_errorlevel�%TestExtractionFilters.test_errorlevel1sY��	C�	A�	1�	@�	7��^�^�s��G�G�F�O��
�
�
����A�� 6�8K�
L�
L��M��
�
����A�� 6�8J�
K�
K��L��
�
����A�� 6��
G�
G��H��
�
����A�� 6��
H�
H��!�!�'�"2�"2�3�I��
�
����A�� 6�8I�
J�
J��!�!�*�-�K�
�
�
����A�� 6�8K�
L�
L��M��
�
����A�� 6�8J�
K�
K��!�!�'�"5�"5�6�L��
�
����A�� 6��
G�
G��!�!�'�*�H��
�
����A�� 6��
H�
H��!�!�'�"2�"2�3�I��
�
����A�� 6�8I�
J�
J��!�!�*�-�K�
�
�
����A�� 6�8K�
L�
L��!�!�'�"6�"6�7�M��
�
����A�� 6�8J�
K�
K��!�!�'�"5�"5�6�L��
�
����A�� 6��
G�
G��!�!�'�*�H��
�
����A�� 6��
H�
H��!�!�'�"2�"2�3�I��
�
����A�� 6�8I�
J�
J��!�!�*�-�K�
�
�
����F�� ;�=O�
P�
P��!�!�)�,�Q�
P�q�^�^��
M�
L�
L��L�
K�
K��H�
G�
G��I�
H�
H��K�
J�
J��
M�
L�
L��L�
K�
K��H�
G�
G��I�
H�
H��K�
J�
J��
M�
L�
L��L�
K�
K��H�
G�
G��I�
H�
H��K�
J�
J��
Q�
P�
P�s1�R+�'R?�S�S'� S;�T�T#� T7�#U�+ U�=U3� V� V�)V/�1 W�W�W+�+R<	�4R<	�?S	�S	�S$	�S$	�'S8	�0S8	�;T	�T	�T 	�T 	�#T4	�,T4	�7U	�U	�U	�U	�U0	�(U0	�3V	�<V	�V	�V	�V,	�$V,	�/W	�8W	�W	�W	�W(	� W(	�+W<	�4W<	r�c	���[OQ2oQUm[O2oUOUO
U22UO]2[OUQQ59^tt^2oUO[O29^tt^2UO2PPP2PPP2P!)%fhK9h)%fhP!9h)z	huge-filerNr�l)r-r_rnr*r�r^r`r�r,rUrIr )r!r��tinfor�rWs&&   r�test_getmembers_big_size�.TestExtractionFilters.test_getmembers_big_sizexs�������,����
��j�j�l���	�	�%�+�+�f�%�&�	�����
�\�\�#�D�
1�
1�S��"�"�7�#4�#4�5�5���� �6�2�
1�5�5��2�
1�
1�s0�(C#�-C	�>C#�C 
�C 
�C#�#C4	�,C4	)r�r�r�)NNNNN)r�)Lr%r&r'r(rrrzr�r�r�r�rr�rrr
rrr�r!rrkr?rBrGrKrNrRrVrarerirqr{r�r�r�r�r�r�r�r�r{r�subTestsr-rr�r�r�r�r�r�r�r�r�r�r�rnrr
r�r�r�r�r	r	r
	r	r"	r6	r�r�r:	r1r2r3s@rr�r��s6����
�|�|�G�$�z�1�H����G��.��.�@�'1�t�'1��'1�R*0�X
�%�/�K�2�70��70�r��"�"�FH�#��FH�P�70��70�r�:��:�:��"�"�D�#��D�:�"� -�� -�D�%��%�&��"�"�=�#��=�$��"�"�G�#��G���"�"�G�#��G���"�"�7�#��7�"�@��@�.�9��9�2�1:��1:�f�S��S�.����,�@��@�>�
�����W�-�/A�B�
�����X�.�0C�D�
�����Y�/�1E�F����k�G�O�O�W�_�_�#E�F�0�G�G�E�C��
0�>�
�����W�-�/A�B�
�����X�.�0C�D�
�����Y�/�1E�F����k�G�O�O�W�_�_�#E�F�0�G�G�E�C��
0�@E�&*� ND�`+�$
?�1�;�
;��_�_�S�\�\�W�,�.K�L�
P�M�
P��_�_�S�\�\�W�,�.K�L�M�M�M�(	.�
2�
.�-�%�".�3�<E-�N
���h��!3�!3�W�5G�5G� H�I�
!�J�
!rr�c�v`�\sQsQsn\O
O
\Q2s\	Q2s
QsQsQs
UsP!)�OverwriteTestsi��
testoverwritec��[OO[Q29pmUO[OU2[OUQ29^tt^2o[OQ2o]
UmUOU[OQ22PPP2[OO[Q29pmUO[OU2[OUQ29^tt^2oUOUO![O"Q22PPP2[OO[Q2oVmUO[OU2[OUQ29^tt^2o[OQ2o]
UmUOU[OQ22PPP2P!)%fhCKi9h)%fhK�9h)%fhP!9h)ztar-with-file.tarr�r7s
newcontentztar-with-dir.tarztar-with-implicit-dir.tarz	test/file)r{r|r}rz�ar_with_file�addClassCleanuprr�r-r,r_rnrgr*r��ar_with_dirr��curdir�ar_with_implicit_dir)r�rQrWrjs&   rr��OverwriteTests.setUpClass�sw��!�w�w�|�|�G�5H�I�I������I�,�,�a�0�
�\�\�!�S�
!�
!�S�����'�A��A�F��K�K��2�:�:�m�4�5�"�
!�g�g�l�l�7�4F�G�G��O����I�,�,�a�0�
�\�\�!�S�
!�
!�S��K�K����r�y�y�&�9�:�"�
�G�G�L�L��"=�>��#$� ����I�,�,�a�0�
�\�\�!�S�
!�
!�S�����,�A��A�F��K�K��2�:�:�m�4�5�"�
!�"�
!�
!��"�
!��"�
!�
!�s8�+AH� 0H#�AH6�H 	�H 	�#H3	�,H3	�6I	�?I	c�2�[OUQ2!rE)r-r,)r!r|s&&rr,�OverwriteTests.open�s���|�|�D�#�&�&rc�B�UOUOQQ5P!)rrv)r�testdir)r!�ars&&rr�OverwriteTests.extractall�s��
�
�
�d�l�l�?�
�;rr$)r%r&r'r(r{r|r}rzrJ	r�r�r,rr1r2r3s@rr>	r>	�s:�����g�g�l�l�7�O�4�G��6��6�*'�<�<rr>	c�J	`�\sQsQsn\s\O\O*Q*\	*\O*Q*\	*\O*Q*\	*\O*Q*\	*\O]**\	*Q*\O*\O*\O\O**\O*\O] **\O] **\O]**\	*\O*\O]**\	*\O*\O\O**\O]**s\O\O*Q*\O*Q*\O*Q*\O*Q*\	*\O]**\	*Q*\O*\O*\O\O**\O*\O] **\O] **\O]**\O]**\O]�**s\O\O*Q*\	*\O*Q*\	*\O*Q*\	*\O*Q*\	*\O]**\	*Q	*\O*\O*\O\O**\O]�**s\O$Q
2O'\O(2sQ\O,*sQsQQksQ
sQsQsQsQsQsUs P!)�OffsetValidationTestsi�s000755s000001��s0011407s0000755s0000001s0011327s0010070rgc��[UOQ29^tt^2oUOU2PPP2P!)%fhP!9hrT)r,r)r^)r!�bufferr�s&& r�
_write_buffer�#OffsetValidationTests._write_buffers/��
�$�,�,��
%�
%��
�G�G�F�O�&�
%�
%�
%�r�c	�0�[UOQ29^tt^2o[OQV!Q59^tt^2oUO2ttPPP2ttPPP2!)%fhL9hPPP2P!)%fhP!9h)r�rx)r"r�rZ)r,r)r-r )r!rZr�rWs&&  r�_get_members�"OffsetValidationTests._get_members
si��
�$�,�,��
%�
%������!�����~�~�'���&�
%�����&�
%�
%�
%�s/�!B�A&	�
B�&A6
�/A6
�1B�B	�
B	c��UO[OQ29^tt^2UO2PPP2P!)%fhP!9h)rn)rOr-rIrU	r s&r�#_assert_raises_read_error_exception�9OffsetValidationTests._assert_raises_read_error_exceptionsD��
�
#�
#����F�
�
�
����
�
�
�
�s�A�A	�A	c	��QUO1QUO1QUO11FDIvqUOUQ59^tt^2UO	U2UO2PPP2JK	P!)%fhJ`9h)�posixra�v7r�)�invalid_posix_header�invalid_gnu_header�invalid_v7_headerr�rR	rX	)r!�
tar_format�invalid_headers&  r�&test_invalid_offset_header_validations�<OffsetValidationTests.test_invalid_offset_header_validationss|��
�d�/�/�0�
�D�+�+�,�
�4�)�)�*�+
�&�J�
���Z��0�0��"�"�>�2��8�8�:�1�0�+
�
1�0�0�s�"A;	�;B
�B
c�h�UOUO*UO*oUOU2UO2oUO	[U2]2UO	U]*OQ2UO	U]*O]2P!)r�rg)�valid_gnu_headerr^	rR	rU	rlrmr�r��r!rQ	r!s&  r�(test_early_stop_at_invalid_offset_header�>OffsetValidationTests.test_early_stop_at_invalid_offset_header!s����&�&��)@�)@�@�4�CX�CX�X�����6�"��#�#�%������W��q�)���������*�5�������*�*�A�.rc���UOUO*]*oUOU2UOP	Q5oUO	[U2]2P!)re�rZ)r^	�
data_blockrR	rU	rlrmrf	s&  r�test_ignore_invalid_archive�1OffsetValidationTests.test_ignore_invalid_archive)sP���)�)�D�O�O�;�q�@�����6�"��#�#��#�6������W��q�)rc���UOUOUO*]1UOUO*UOQ11FD�vqoUOV*2UO	P	Q5oUO[
U2]2UOU]*OQ2UOU]*OU2J�	P!)rr�rj	rg)	re	r^	rk	rR	rU	rlrmr�r�)r!�first_block�second_block�expected_offsetr!s&    r�"test_ignore_invalid_offset_headers�8OffsetValidationTests.test_ignore_invalid_offset_headers0s����&�&��(�(�4�?�?�:��
��(�(�4�?�?�:��&�&��
�
;
�6�K��
���{�9�:��'�'�T�'�:�G����S��\�1�-����W�Q�Z�_�_�j�9����W�Q�Z�.�.��@�!;
rr$s�����������r
)!r%r&r'r(r�r)r-rr��SPACEr�r�rrr]	rr^	r_	r_r`r�re	r�rk	rR	rU	rX	rb	rg	rl	rr	r1r2r3s@rrN	rN	�s=�����G�	���g�)�)�)�
�	��	�%�k�k�	*��		��		�&�k�k�		*��
	��
	�&�k�k�
	*��	��	��+�+��
�
	�#�
	#��	��{�{�	#��/�/�	� �+�+��+�+�
+�!	,�$�
�
�%	�(�+�+��
�)	�,�+�+��
�-	�0�+�+��/�1	�0"�1	"�0%,�K�K�1	0�4�+�+��/�5	�4"�5	"�4%,�K�K�5	0�8�+�+��-�-�
-�9	.�<�+�+��
�=	��H	���g�)�)�)�
�	��{�{�	#��		��{�{�		#��
	��{�{�
	#��	��	��+�+��
�
	�#�
	#��	��{�{�	#��/�/�	� �+�+��+�+�
+�!	,�$�
�
�%	�(�+�+��
�)	�,�+�+��
�-	�0�+�+��/�1	�4�+�+��/�5	�8�+�+��
�9	��D	���g�)�)�)�
�	��	�%�k�k�	*��		��		�&�k�k�		*��
	��
	�&�k�k�
	*��	��	��+�+��
�
	�#�
	#��	��{�{�	#��/�/�	� �+�+��+�+�
+�!	,�$�+�+��
�%	��,���z�2�8�8��9K�9K�L���7�,�,�,�J��(� �;�/�*�A�ArrN	c�(`�\sQsQsnQsQsUsP!)�
TestModuleiDc���UO[Q29^tt^2o[[Q2PPP2UO	WO
[2P!)%fhK29h)z='version' is deprecated and slated for removal in Python 3.20r
)�assertWarnsRegexrYr�r-rlrgr1)r!r]s& r�test_deprecated_version�"TestModule.test_deprecated_versionEsP��
�
"�
"�"�O�
�
���G�Y�'�	
�
	
������h�/�
�
�s�A�A+	�$A+	r$)r%r&r'r(ry	r1r2r3s@rrv	rv	Ds����0�0rrv	c	��[O[2[O[2[
,r[[
Q29^tt^2oUO2oPPP2[[[[1FD�oUO%fJ[OUO
2[OUO
2UOUO
Q29^tt^2oUOW2PPP2J�	P!)%fhK�9h)%fhJ�9h)r�r5)rr�rzr{rVr)rsr,rkr6r=rCrJr�r^)rrrr�rWs    r�setUpModuler|	Ns���
���W���K�K����9�L�	
�g�t�	�	���y�y�{��
��w��(�
2���6�6�6����Q�Y�Y�'�����	�	�*�����	�	�4�(�(�C��	�	�$��)�(�	3�	
�	��)�(�(�s$�D�?D2	�D/	�(D/	�2E
�;E
c��[OO[2%c[O
[2P!P!r
)r{r|r-rzrrr$rr�tearDownModuler~	_s(��	�w�w�~�~�g�������!�r�__main__)�r4rr{r*�hashlibr�
contextlibrr�randomrrr`r�rWrrGr��
unittest.mockr-r7rr�test.supportrr	r
r9r�rHr>rF�compressionrrr|r�r�rzr�ror)r}r8r?rErLr�r�rt	rorr�
requires_gzipr6r�r=�
requires_lzmarC�
requires_zstdrJrPr`�TestCaserer�r�r�r�r�r&r)r,r/r2r�r~�cpython_onlyr�r�rprr�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�rrrrrr9rPrSrWrZrirrrvr|r�r�r�r�r�r
rrrr�r�rr0rLrjr�r�r�r�r�r�r�r�r�r�rNr�rnr�r�rrr/rGr�r�r�r�r�r�rHr7r�r�r>	rN	rv	r|	r~	r%r*r$rr�<module>r�	s
���
�	�	��0���
�	���������"�&�(���������� �$�
�'�'�/�/�)�*�*�
+�i�
7���o�%�	�
�
�
�=�1B�
C��
�7�7�<�<��!1�2��
�'�'�,�,�w� 1�
2��	�����g�/�	0��
�'�'�,�,�w� 1�
2��
�'�'�,�,�w�	�
*���g�g�l�l�7�I�.����G��G��
)�)�	����%�%��%�	����&�&��&�	����%�%��%�	����&�&��&�	�w�	�-�X�-�U�H�h�/�/�U�n	��-�	�	�w�
�	�	��-�	�	��-�	�Y1�x��*�*�Y1�x	�8�X�	�	�'�8�	�	�8�X�	�	�8�X�	�Z1�X�Z1�z"�r�z�z�"�	���$�x�0�0�$��$�@TP�~�TP�n
��:�#�X�%6�%6��	�x�!1�3C�X�EV�EV�	�	�g�/��1B�1B�	�	�x�!1�8�3D�3D�	�	�x�!1�8�3D�3D�	�<�^�X�%6�%6�<�|	��#3�^�	�	���	�	��>�	�	��>�	�/�N�H�,=�,=�/�	�X�'<�	�	�G�%:�	�	�X�'<�	�	�X�'<�	�&1�W�h�/�/�&1�P	��>�	�
,���
,�	��>�	�	��>�	�1�x��1B�1B�1�"^E�X�x�0�0�^E�BH+�H+�V9�,��(�*;�*;�9�xT@�,��(�*;�*;�T@�nG�G�G�<N%�
�x�0�0�N%�b
	�H�i�	�	�7�I�	�	�H�i�	�	�H�i�	�2*�m�X�%6�%6�2*�j;�(�O�;�08��/�8�;�(�O�;�;�(�O�;�?�7�?�,!�7�$8�(�:K�:K�!�!��*>����!� �(�%9�8�;L�;L� � ��*>���� �C�(�+�+�C�$O5�8�$�$�O5�d+&�}�h�&7�&7�+&�\W.��� 1� 1�W.�t;�X�z�;�,�G�Z��%�X�z�%�%�X�z�%�(�*�(�
���W�R��(�*K�L�'1�8�$�$�'1�M�'1�TH8�<�H8�VN�N�bL�{�H�$5�$5�L�^G�[�(�"3�"3�G�$K�[�(�"3�"3�K�(I�I�(>%���!2�!2�>%�@	�X�~�x�/@�/@�	�	�G�^�X�->�->�	�	�X�~�x�/@�/@�	�	�X�~�x�/@�/@�	�8*��"�"�8*�vs&�x� � �s&�la �h�'�'�a �H7B��*�*�7B�t
�����V�$�&F�G�@��(�"3�"3�@�H�@�B*��(�"3�"3�*�>	�
���W�R��)�+=�>�	���W�R��+�-A�B�wO�x�(�(�wO�C�?�wO�t%-�8�X�.�.�%-�Pd�8�d�L� 4�h�6G�6G��(�(<�(0�(9�(9�(��3�X�5F�5F���#7�#+�#4�#4��^8��*�*�^8�@�8D3�D3�V�?�?�?�C��t!�H�-�-�t!�n%<�^�2�2�H�4E�4E�<�@XA�H�-�-�XA�v0��"�"�0� �""��z���M�M�O���Ob���D������D�����
�C������D������D��sx�)e#�.e3�3f�8f�=f#�#e0�)e0�/e0�3f�9f�?f�f�	f�f�f �f �f �#f0�)f0�/f0

Youez - 2016 - github.com/yon3zu
LinuXploit