403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/__pycache__/test_zlib.cpython-36.pyc
3

x2_��@sBddlZddlmZddlZddlZddlZddlZddlmZm	Z	m
Z
ejd�Zej
eej�d�d�Zej
eej�d�d�ZGdd	�d	ej�ZGd
d�dej�ZGdd
�d
ej�ZGdd�dej�ZGdd�de�ZGdd�deej�ZGdd�deej�Zdefdd�Zdefdd�ZdZGdd�d�Ze dk�r>ej!�dS)�N)�support)�
bigmemtest�_1G�_4G�zlib�copyzrequires Compress.copy()zrequires Decompress.copy()c@seZdZdd�ZdS)�VersionTestCasecCs|jtjdtjd�dS)Nr)�assertEqualr�ZLIB_RUNTIME_VERSIONZZLIB_VERSION)�self�r�3/opt/alt/python36/lib64/python3.6/test/test_zlib.py�test_library_versionsz$VersionTestCase.test_library_versionN)�__name__�
__module__�__qualname__rrrrr
rsrc@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�ChecksumTestCasecCs0|jtjd�tjdd��|jtjdd��dS)N�rsabcl��)r	r�crc32�
assertTrue)rrrr
�test_crc32start sz ChecksumTestCase.test_crc32startcCs@|jtjdd�d�|jtjdd�d�|jtjdd�d�dS)Nrr�i�)r	rr)rrrr
�test_crc32empty$sz ChecksumTestCase.test_crc32emptycCs0|jtjd�tjdd��|jtjdd��dS)Nrrsabcl��)r	r�adler32r)rrrr
�test_adler32start)sz"ChecksumTestCase.test_adler32startcCs@|jtjdd�d�|jtjdd�d�|jtjdd�d�dS)Nrrri�)r	rr)rrrr
�test_adler32empty-sz"ChecksumTestCase.test_adler32emptycCs�|jtjdd�d�|jtjdd�d�|jtjdd�d�|jtjdd�d�|jtjd�tjdd��|jtjd�tjdd��dS)Nspenguinrl !�Kri���Ci��i��)r	rrr)rrrr
�
test_penguins2szChecksumTestCase.test_penguinscCsTd}|jtj|�d�|jtjd�d�|jtj||�d�|jtjd�d�dS)Nsabcdefghijklmnopl�@u(sspami=��Cl
*i�O)r	rrr)r�foorrr
�test_crc32_adler32_unsigned;s
z,ChecksumTestCase.test_crc32_adler32_unsignedcCsHd}d}|jtj|�|�|jtj|�|�|jtjd�tjd��dS)Nsabcdefghijklmnopl�@u(sspam)r	�binasciirr)rrZcrcrrr
�test_same_as_binascii_crc32Cs
z,ChecksumTestCase.test_same_as_binascii_crc32N)
rrrrrrrrrr rrrr
rs	rc@s&eZdZeedddd�dd��ZdS)�ChecksumBigBufferTestCase�rF)�size�memuseZdry_runcCs4dtd}|jtj|�d�|jtj|�d�dS)NsnyanriM"B>l�a
)rr	rrr)rr#�datarrr
�test_big_bufferNsz)ChecksumBigBufferTestCase.test_big_bufferN)rrrrrr&rrrr
r!Lsr!c@sBeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zej	dd��Z
d
S)�ExceptionTestCasecCs|jtjtjdd�dS)NsERROR�
)�assertRaisesr�error�compress)rrrr
�
test_badlevelWszExceptionTestCase.test_badlevelcCs�|jttj�|jttj�|jttj�|jttj�xXddddfgfD]D}|jttj|�|jttj|�|jttj|�|jttj|�qJWdS)N�*��abc)r)�	TypeErrorrrrr+�
decompress)r�argrrr
�test_badargs]szExceptionTestCase.test_badargscCs6|jttjdtjd�|jttjdtjtjd�dS)Nrr)r)�
ValueErrorr�compressobj�DEFLATED�	MAX_WBITS)rrrr
�test_badcompressobjhsz%ExceptionTestCase.test_badcompressobjcCs|jttjd�dS)Nr���)r)r4r�
decompressobj)rrrr
�test_baddecompressobjosz'ExceptionTestCase.test_baddecompressobjcCs,|jttj�jd�|jttj�jd�dS)Nrrr9)r)r4rr:�flush)rrrr
�test_decompressobj_badflushssz-ExceptionTestCase.test_decompressobj_badflushcCs�|jtd��tjddtjd�WdQRX|jtd��tj�jdtjd�WdQRX|jtd��tj�jtjd�WdQRXdS)Nz
int too larger�r)�assertRaisesRegex�
OverflowErrorrr1�sys�maxsizer:r<)rrrr
�
test_overflowxs zExceptionTestCase.test_overflowN)rrrr,r3r8r;r=rZcpython_onlyrCrrrr
r'Usr'c@seZdZdd�Zdd�ZdS)�BaseCompressTestCasec
sLd�dj�fdd�td�D��}||t|�d}z||�Wdd}XdS)Nircs"g|]}tjd��j�d��qS)��little)�randomZgetrandbits�to_bytes)�.0�i)�_1Mrr
�
<listcomp>�szBBaseCompressTestCase.check_big_compress_buffer.<locals>.<listcomp>r(ri)�join�range�len)rr#Z
compress_funcr%r)rKr
�check_big_compress_buffer�sz.BaseCompressTestCase.check_big_compress_buffercCs^d|}ztj|d�}Wdd}X||�}z*|jt|�|�|jt|jd��d�Wdd}XdS)N�xrr)rr+r	rO�strip)rr#Zdecompress_funcr%�
compressedrrr
�check_big_decompress_buffer�sz0BaseCompressTestCase.check_big_decompress_bufferN)rrrrPrTrrrr
rD�srDc@s�eZdZdd�Zdd�Zdd�Zdd�Zeedd
d�dd
��Z	eeddd�dd��Z
eedd�dd��Zdd�Z
ejejdkd�eeddd�dd���ZdS) �CompressTestCasecCs tjt�}|jtj|�t�dS)N)rr+�HAMLET_SCENEr	r1)r�xrrr
�test_speech�s
zCompressTestCase.test_speechc
Csdtjtdd�}|jtj|�t�|jt��tjtdd�WdQRX|jtj|tjtjd�t�dS)N�)�level)r%rZ)�wbits�bufsize)	rr+rVr	r1r)r0r7�DEF_BUF_SIZE)rrWrrr
�
test_keywords�s
zCompressTestCase.test_keywordscCsTtd}tj|�}|jtjt|��|�x&|t|�fD]}|jtj|�|�q6WdS)N�)rVrr+r	�	bytearrayr1)rr%rW�obrrr
�test_speech128�s

zCompressTestCase.test_speech128cCs*tjt�}|jtjdtj|dd��dS)NzAError -5 while decompressing data: incomplete or truncated streamrr9)rr+rVr?r*r1)rrWrrr
�test_incomplete_stream�s
z'CompressTestCase.test_incomplete_streamirY)r#r$cCsdd�}|j||�dS)NcSstj|d�S)Nr)rr+)�srrr
�<lambda>�sz;CompressTestCase.test_big_compress_buffer.<locals>.<lambda>)rP)rr#r+rrr
�test_big_compress_buffer�sz)CompressTestCase.test_big_compress_buffer�cCs|j|tj�dS)N)rTrr1)rr#rrr
�test_big_decompress_buffer�sz+CompressTestCase.test_big_decompress_bufferrcCs.td}tj|d�}|jtj|d|�|�dS)Nr(rr>)rVrr+r	r1)rr#r%rSrrr
�test_large_bufsize�sz#CompressTestCase.test_large_bufsizecCs0td}tj|d�}|jtj|dt��|�dS)Nr(rr>)rVrr+r	r1�	CustomInt)rr%rSrrr
�test_custom_bufsize�sz$CompressTestCase.test_custom_bufsize� zrequires 64bit platform�dr"cCs:d|}z"tj|d�}|jtj|�|�Wdd}}XdS)NrQr)rr+r	r1)rr#r%�comprrr
�test_64bit_compress�s
z$CompressTestCase.test_64bit_compressNiil)rrrrXr^rbrcrrrfrhrrirk�unittest�
skipUnlessrArBrorrrr
rU�s
	rUc@s�eZdZdd�Zdd�Zdd�Zdd�Zd]d
d�Zdd�Zd^dd�Z	d_dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd �Zejeed!�d"�d#d$��Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zee d7d8�d9d:��Z!d;d<�Z"e#d=d>��Z$e#d?d@��Z%e&dAdB��Z'e&dCdD��Z(dEdF�Z)dGdH�Z*ee+d`dJd8�dKdL��Z,ee+dadMd8�dNdO��Z-eje.j/dbkdQ�ee dRdSd8�dTdU���Z0eje.j/dckdQ�ee dRdJd8�dVdW���Z1eje.j/ddkdQ�ee dRdXd8�dYdZ���Z2d[d\�Z3d
S)e�CompressObjectTestCasecCs�td}tj|�}xN|t|�fD]>}tj�}|j|�}|j�}|jtj|j�|j|||�q Wxn||ft|�t|�ffD]R\}}tj	�}	|	j
||�}
|	j�}|j||
|�|j|	jt
�|j|	jt
�q|WdS)Nr_)rVrr+r`r5r<r)r*r	r:r1�assertIsInstance�unconsumed_tail�bytes�unused_data)rZdatasrcZdatazipr%�co�x1�x2Zv1Zv2�dco�y1�y2rrr
�	test_pair�s

"z CompressObjectTestCase.test_pairc
Cs�d}tj}d	}d}tj}tj|||||dd�}tj|dd�}|jt��|jtd�WdQRX|jt��|j	tjt�d�WdQRX|jt�|j
�}|j	|tt�d�|j
�}	|jt|	�dS)
Nrg��	r)rZ�methodr[�memLevel�strategy�zdict)r[r�)r%)�
max_lengthi�)
rr6�
Z_FILTEREDr5r:r)r0r+rVr1r<rOr	)
rrZr�r[r�r�rw�dorW�yrrr
r^�s&z$CompressObjectTestCase.test_keywordscCspd}tj}d}d}tj}tj|||||�}|jt�}|j�}tj|�}	|	j||�}
|	j�}|j	t|
|�dS)Nrgr~ri�)
rr6r�r5r+rVr<r:r1r	)rrZr�r[r�r�rwrxryrzr{r|rrr
�test_compressoptionss

z+CompressObjectTestCase.test_compressoptionsc	Cs�td}tj�}g}x4tdt|�d�D] }|j|j|||d���q&W|j|j��dj|�}tj	�}|j
dj|��}|j�}|j|||�dS)Nr_r�r)rVrr5rNrO�appendr+r<rMr:r1r	)	rr%rw�bufsrJ�combufrzr{r|rrr
�test_compressincrementals 
z/CompressObjectTestCase.test_compressincrementalFNr��@c
Csp|pt}|d}tj�}g}x4tdt|�|�D] }|j|j||||���q.W|j|j��dj|�}	tj	|	�}
|j
|
t�|j||
�tj
�}g}x\tdt|	�|�D]H}|j|j	|	|||���|jd|jdt|j��|jd|j�q�W|�r|j|j��n&x$|j	d�}|�r*|j|�nP�qW|jd|jdt|j��|jd|j�|j|dj|��dS)Nr_rrz"(A) uct should be b'': not %d longz"(B) uct should be b'': not %d long)rVrr5rNrOr�r+r<rMr1rsrur	r:rtrv)
rr<�source�cx�dcxr%rwr�rJr�Zdecombufrz�chunkrrr
�test_decompinc*s> 




z%CompressObjectTestCase.test_decompinccCs|jdd�dS)NT)r<)r�)rrrr
�test_decompincflushSsz*CompressObjectTestCase.test_decompincflushcCs�|pt}|d}tj�}g}x4tdt|�|�D] }|j|j||||���q.W|j|j��dj|�}|j	|tj
|�d�tj�}	g}|}
xD|
r�|	j
|
|�}|jt|�|kdt|�|f�|j|�|	j
}
q�W|j|	j��|j	|dj|�d�dS)Nr_rrzcompressed data failurezchunk too big (%d>%d)zWrong data retrieved)rVrr5rNrOr�r+r<rMr	r1r:�assertFalsert)rr�r�r�r%rwr�rJr�rz�cbr�rrr
�test_decompimaxVs* 


z&CompressObjectTestCase.test_decompimaxcCsJtd}tj�}g}x4tdt|�d�D] }|j|j|||d���q&W|j|j��dj|�}|j	|tj
|�d�tj�}g}|}xT|r�dt|�d}	|j
||	�}
|jt|
�|	kdt|
�|	f�|j|
�|j
}q�W|r�|j|j��nBx@|
�r0|j
d|	�}
|jt|
�|	kdt|
�|	f�|j|
�q�W|j	|dj|�d	�dS)
Nr_rr�rzcompressed data failurerr(zchunk too big (%d>%d)zWrong data retrieved)rVrr5rNrOr�r+r<rMr	r1r:r�rt)rr<r%rwr�rJr�rzr�r�r�rrr
�test_decompressmaxlenqs6 


z,CompressObjectTestCase.test_decompressmaxlencCs|jdd�dS)NT)r<)r�)rrrr
�test_decompressmaxlenflush�sz1CompressObjectTestCase.test_decompressmaxlenflushcCs,tj�}|jt|jdd�|jd|j�dS)Nrrr9)rr:r)r4r1r	rt)rrzrrr
�test_maxlenmisc�sz&CompressObjectTestCase.test_maxlenmisccCsHtd}|jt|�tj�tj|d�}tj�}|j|j|t	j
�|�dS)Nr(r)rVZ
assertGreaterrOrr]r+r:r	r1rArB)rr%rSrzrrr
�test_maxlen_large�s
z(CompressObjectTestCase.test_maxlen_largecCs>td}tj|d�}tj�}|j|j|t��|dd��dS)Nr(rrm)rVrr+r:r	r1rj)rr%rSrzrrr
�test_maxlen_custom�sz)CompressObjectTestCase.test_maxlen_customcCs:d}tj�}|j|d�}||j|j�7}|j|jd�dS)Ns
x�KLJMrr)rr:r1rtr	)rZcdatarzZddatarrr
�test_clear_unconsumed_tail�s
z1CompressObjectTestCase.test_clear_unconsumed_tailcCsddddg}tdd�tjjd�D��}|dkr8|jd�d
d�|D�}td}x�|D]�}x�td�D]�}yDtj|�}|j|dd��}|j	|�}|j|dd��}	|j	�}
Wnt
dj||���YnX|jtj
dj|||	|
g��|d||f�~qbWqTWdS)NZ
Z_NO_FLUSH�Z_SYNC_FLUSHZZ_FULL_FLUSHZZ_PARTIAL_FLUSHcss|]}t|�VqdS)N)�int)rI�vrrr
�	<genexpr>�sz6CompressObjectTestCase.test_flushes.<locals>.<genexpr>�.rrg�rYZZ_BLOCKcSs g|]}tt|�rtt|��qSr)�hasattrr�getattr)rIZoptrrr
rL�sz7CompressObjectTestCase.test_flushes.<locals>.<listcomp>rEr(i�z!Error for flush mode={}, level={}rz*Decompress failed: flush mode=%i, level=%i)rrgr�rY)�tuplerr
�splitr�rVrNr5r+r<�print�formatr	r1rM)rZsync_optZverr%�syncrZ�obj�a�b�c�drrr
�test_flushes�s.




z#CompressObjectTestCase.test_flushesr�zrequires zlib.Z_SYNC_FLUSHc	Cs�ddl}tjtj�}tj�}y|j�}Wn:tk
rby|j�}Wntk
r\|}YnXYnX|jd�t	dd|d�}|j
|�}|jtj�}|j
||�}|j||d�dS)Nrr�i)�	generatorz17K random source doesn't matchiD)rGrr5�Z_BEST_COMPRESSIONr:ZWichmannHill�AttributeErrorZRandom�seed�genblockr+r<r�r1r	)	rrGrwrz�genr%�first�secondZexpandedrrr
�test_odd_flush�s 

z%CompressObjectTestCase.test_odd_flushcCs6tjtj�}|j|j��tj�}|j|j�d�dS)Nr)rr5r�rr<r:r	)rrwrzrrr
�test_empty_flush�sz'CompressObjectTestCase.test_empty_flushcCs�t}|j�}tj|�dj|�}tj|d�}|j|�|j�}tj	|d�}|j
|j|�|j�|�tj	�}|jtj
|j|�dS)Nr)r�)rVr�rGZshufflerMrr5r+r<r:r	r1r)r*)r�hZwordsr�rwZcdrzrrr
�test_dictionary�s

z&CompressObjectTestCase.test_dictionarycCs�tjtd�}tjtd�}tdd�}|j|�|jtj�}|j|dd��|jtj�}|j|dd��|jtj�}|j|j|�|�|j|j|�|dd��|j|j|�|dd��dS)N)r�i�i�rmi����i����)	rr5rVr:r+r<r�r	r1)rrwr�Zpiece�d0�d1Zd2rrr
�test_dictionary_streamingsz0CompressObjectTestCase.test_dictionary_streamingcCsfd}|jtj|�d�|jtjtj|dd��tj�}|j|dd��}||j�7}|j|d�dS)Nsx�K���Esfoor����r�)r	rr1r)r*r:r<)rrWrzr�rrr
�!test_decompress_incomplete_streamsz8CompressObjectTestCase.test_decompress_incomplete_streamcCsld}tj�}|j|j�|j|dd��|j|j�|j|dd��|j|j�|j�|j|j�dS)Nsx�K���Er�r�r�)rr:r��eofr1rr<)rrWrzrrr
�test_decompress_eof(sz*CompressObjectTestCase.test_decompress_eofcCsNd}tj�}|j|j�|j|dd��|j|j�|j�|j|j�dS)Nsx�K���Er�r�)rr:r�r�r1r<)rrWrzrrr
�%test_decompress_eof_incomplete_stream3sz<CompressObjectTestCase.test_decompress_eof_incomplete_streamc

Cs d}d}tj|�}||}�x�dD]�}x�ddt|�t|�fD]�}tj�}d}x�tdt|�|�D]r}	|	t|�kr||j|jd�|dkr�||j||	|	|��7}|j|jd�q^||j|j||	|	|�|�7}q^W||j	�7}|j
|j�|j||�|j|jd�|j|j|�q<Wq"WdS)	Nsabcdefghijklmnopqrstuvwxyzs
0123456789r��rrgr)rr�)rr+rOr:rNr	rvr1rtr<rr�)
rr�Z	remainderr�rW�maxlen�steprzr%rJrrr
�test_decompress_unused_data<s*
 z2CompressObjectTestCase.test_decompress_unused_datacCs\d}tjtj|d�}|j|�|j�}tjtj|d�}|j|�|j�}|j||�dS)Nsabcdefghijklmnopqrstuvwxyz)r[r�)rr5r7r+r<r:r1r	)rr�rwrnrz�uncomprrr
�#test_decompress_raw_with_dictionaryWsz:CompressObjectTestCase.test_decompress_raw_with_dictionarycCsNd}d}tj|�}tj�}|j|d�~tj|�}|j|j�|dd��dS)NsabcdefghijklmnopqrstuvwxyzsQWERTYUIOPASDFGHJKLZXCVBNMr)rr+r:r1r	r<)rZinput1Zinput2r%rzrrr
�test_flush_with_freed_input_s

z2CompressObjectTestCase.test_flush_with_freed_inputr)r#r$cCsFtd}tj|d�}tj�}|j|d�|j|j|�|dd��dS)Nr(r)rVrr+r:r1r	r<)rr#�inputr%rzrrr
�test_flush_large_lengthks
z.CompressObjectTestCase.test_flush_large_lengthcCsHtd}tj|d�}tj�}|j|d�|j|jt��|dd��dS)Nr(r)rVrr+r:r1r	r<rj)rr�r%rzrrr
�test_flush_custom_lengthts
z/CompressObjectTestCase.test_flush_custom_lengthc	Cs�t}tttd�j�d�}tjtj�}g}|j|j|��|j	�}|dd�}|j|j|��|j|j
��dj|�}|j|j|��|j|j
��dj|�}|jtj
|�||�|jtj
|�||�dS)N�asciir)rVru�str�swapcaserr5r�r�r+rr<rMr	r1)	rZdata0Zdata1Zc0�bufs0Zc1�bufs1�s0�s1rrr
�test_compresscopy{s

z(CompressObjectTestCase.test_compresscopycCs,tj�}|jt�|j�|jt|j�dS)N)rr5r+rVr<r)r4r)rr�rrr
�test_badcompresscopy�s
z+CompressObjectTestCase.test_badcompresscopyc	Cs�t}tj|�}|j|t�tj�}g}|j|j|dd���|j�}|dd�}|j|j|dd���dj	|�}|j|j|dd���dj	|�}|j
||�|j
||�dS)Nrlr)rVrr+rsrur:r�r1rrMr	)	rr%rnr�r�r�r�r�r�rrr
�test_decompresscopy�s


z*CompressObjectTestCase.test_decompresscopycCs6tjt�}tj�}|j|�|j�|jt|j�dS)N)	rr+rVr:r1r<r)r4r)rr%r�rrr
�test_baddecompresscopy�s


z-CompressObjectTestCase.test_baddecompresscopycCsLxFttjd�D]4}|jttjf��tjtjtj	�|�WdQRXqWdS)Nr)
rN�pickle�HIGHEST_PROTOCOLr)r0�
PicklingError�dumpsrr5r�)r�protorrr
�test_compresspickle�sz*CompressObjectTestCase.test_compresspicklecCsHxBttjd�D]0}|jttjf��tjtj�|�WdQRXqWdS)Nr)	rNr�r�r)r0r�r�rr:)rr�rrr
�test_decompresspickle�sz,CompressObjectTestCase.test_decompresspickleirYcs&tjd���fdd�}|j||�dS)Nrcs�j|��j�S)N)r+r<)rd)r�rr
re�szACompressObjectTestCase.test_big_compress_buffer.<locals>.<lambda>)rr5rP)rr#r+r)r�r
rf�s
z/CompressObjectTestCase.test_big_compress_bufferrgcs$tj���fdd�}|j||�dS)Ncs�j|��j�S)N)r1r<)rd)r�rr
re�szCCompressObjectTestCase.test_big_decompress_buffer.<locals>.<lambda>)rr:rT)rr#r1r)r�r
rh�sz1CompressObjectTestCase.test_big_decompress_bufferrlzrequires 64bit platformrmr"cCsbd|}tjd�}tj�}z4|j|�|j�}|j|�|j�}|j||�Wdd}}}XdS)NrQr)rr5r:r+r<r1r	)rr#r%rwr�rnr�rrr
ro�s
z*CompressObjectTestCase.test_64bit_compresscCsfd}d|}tj|�|}tj�}z0|j|�|j�}|j||j�|j||�Wdd}}}XdS)NsabcdefghijklmnoprQ)rr+r:r1r<r	rv)rr#r%Zunusedrnr�r�rrr
�test_large_unused_data�sz-CompressObjectTestCase.test_large_unused_datar�cCsbd|}tj�}z>tj|d�}|j|d�|j�}|j||�|j|jd�Wdd}}}XdS)NrQrrr)rr:r+r1r<r	rt)rr#r%r�rnr�rrr
�test_large_unconsumed_tail�sz1CompressObjectTestCase.test_large_unconsumed_tailc
Cs�tjjdd�djd�}t|�dkr0|jd�n|dj�sDd|d<ttt|��}|dk}tj	dd
d�}|j
t�|j�}|j
tj|d
�t�|r�|j
tj|d�t�|j
tj|d�t�|jtjd
��tj|d�WdQRXtjdd�}|j
|j|�t�tjdd�}|jtjd
��|j|�WdQRXtj	ddd�}|j
t�|j�}|j
tj|d�t�|j
tj|d
�t�|�r�|j
tj|d�t�|j
tj|d�t�tjdd�}|j
|j|�t�tj	ddd�}|j
t�|j�}|j
tj|d�t�tjdd�}|j
|j|�t�tj	ddd�}|j
t�|j�}|j
tj|d�t�|j
tj|d�t�tjdd�}|j
|j|�t�tj	dd d�}|j
t�|j�}	|j
tj|	d!�t�|j
tj|	d"�t�tjd#�}|j
|j|	�t�dS)$N�-rrr�r"�0rgrYr�r>)rZr[rlzinvalid window size�)r[r�r9r9)rrgrYr��/r��)r�i�i�i�i����i����i�i�����r�r�r�)rr
r�rOr��	isnumericr��mapr�r5r+rVr<r	r1r?r*r:)
rr�Zsupports_wbits_0rwZzlib15rzZzlib9Z	deflate15Zdeflate9Zgziprrr
�
test_wbits�s\
z!CompressObjectTestCase.test_wbits)FNr�r�)Nr�r�)Fiilll)4rrrr}r^r�r�r�r�r�r�r�r�r�r�r�r�rprqr�rr�r�r�r�r�r�r�r�r�r�rrr�r��requires_Compress_copyr�r��requires_Decompress_copyr�r�r�r�rrfrhrArBror�r�r�rrrr
rr�sT
)

 		 !


			
rricsj|dk	r|j|�|j�||ks(|dkr,|}t�}x2td||�D]"}|t�fdd�t|�D��7}q@W|S)zDlength-byte stream of random data from a seed (in step-byte blocks).Nrgrc3s|]}�dd�VqdS)r�Nr)rIrW)�randintrr
r�>szgenblock.<locals>.<genexpr>)r�r�rurN)r�Zlengthr�r�ZblocksrJr)r�r
r�5s
"r�cs4|dk	r�j|�|jd����fdd�t|�D�S)z=Return a list of number lines randomly chosen from the sourceN�
csg|]}�j���qSr)Zchoice)rI�n)r��sourcesrr
rLHsz choose_lines.<locals>.<listcomp>)r�r�rN)r�Znumberr�r�r)r�r�r
�choose_linesCs

r�s�
LAERTES

       O, fear me not.
       I stay too long: but here my father comes.

       Enter POLONIUS

       A double blessing is a double grace,
       Occasion smiles upon a second leave.

LORD POLONIUS

       Yet here, Laertes! aboard, aboard, for shame!
       The wind sits in the shoulder of your sail,
       And you are stay'd for. There; my blessing with thee!
       And these few precepts in thy memory
       See thou character. Give thy thoughts no tongue,
       Nor any unproportioned thought his act.
       Be thou familiar, but by no means vulgar.
       Those friends thou hast, and their adoption tried,
       Grapple them to thy soul with hoops of steel;
       But do not dull thy palm with entertainment
       Of each new-hatch'd, unfledged comrade. Beware
       Of entrance to a quarrel, but being in,
       Bear't that the opposed may beware of thee.
       Give every man thy ear, but few thy voice;
       Take each man's censure, but reserve thy judgment.
       Costly thy habit as thy purse can buy,
       But not express'd in fancy; rich, not gaudy;
       For the apparel oft proclaims the man,
       And they in France of the best rank and station
       Are of a most select and generous chief in that.
       Neither a borrower nor a lender be;
       For loan oft loses both itself and friend,
       And borrowing dulls the edge of husbandry.
       This above all: to thine ownself be true,
       And it must follow, as the night the day,
       Thou canst not then be false to any man.
       Farewell: my blessing season this in thee!

LAERTES

       Most humbly do I take my leave, my lord.

LORD POLONIUS

       The time invites you; go; your servants tend.

LAERTES

       Farewell, Ophelia; and remember well
       What I have said to you.

OPHELIA

       'Tis in my memory lock'd,
       And you yourself shall keep the key of it.

LAERTES

       Farewell.
c@seZdZdd�ZdS)rjcCsdS)Nrmr)rrrr
�__int__�szCustomInt.__int__N)rrrr�rrrr
rj�srj�__main__)"rpZtestrrr�rGrAZtest.supportrrr�
import_modulerrqr�r5r�r:r�ZTestCaserrr!r'�objectrDrUrrr�r�rVrjr�mainrrrr
�<module>s<
.	-AWG


Youez - 2016 - github.com/yon3zu
LinuXploit