Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/test/__pycache__/test_zlib.cpython-38.opt-2.pyc
U

>��g��@sJddlZddlmZddlZddlZddlZddlZddlZddlm	Z	m
Z
mZe�d�Z
e�ee
��d�d�Ze�ee
��d�d�ZGdd	�d	ej�ZGd
d�dej�ZGdd
�d
ej�ZGdd�dej�ZGdd�de�ZGdd�deej�ZGdd�deej�Zdefdd�Zdefdd�ZdZGdd�d�Z e!dk�rFe�"�dS)�N)�support)�
bigmemtest�_1G�_4G�zlib�copyzrequires Compress.copy()zrequires Decompress.copy()c@seZdZdd�ZdS)�VersionTestCasecCs|�tjdtjd�dS)Nr)�assertEqualr�ZLIB_RUNTIME_VERSION�ZLIB_VERSION��self�r�-/opt/cppython/lib/python3.8/test/test_zlib.py�test_library_versionsz$VersionTestCase.test_library_versionN)�__name__�
__module__�__qualname__rrrrrrsrc@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�ChecksumTestCasecCs0|�t�d�t�dd��|�t�dd��dS)N�r�abc���)r	r�crc32�
assertTruerrrr�test_crc32start!sz ChecksumTestCase.test_crc32startcCs@|�t�dd�d�|�t�dd�d�|�t�dd�d�dS�Nrr�i�)r	rrrrrr�test_crc32empty%sz ChecksumTestCase.test_crc32emptycCs0|�t�d�t�dd��|�t�dd��dS)Nrrrr)r	r�adler32rrrrr�test_adler32start*sz"ChecksumTestCase.test_adler32startcCs@|�t�dd�d�|�t�dd�d�|�t�dd�d�dSr)r	rrrrrr�test_adler32empty.sz"ChecksumTestCase.test_adler32emptycCs�|�t�dd�d�|�t�dd�d�|�t�dd�d�|�t�dd�d�|�t�d�t�dd��|�t�d�t�dd��dS)Nspenguinrl !�Kri���Ci��i���r	rrrrrrr�
test_penguins3szChecksumTestCase.test_penguinscCsTd}|�t�|�d�|�t�d�d�|�t�||�d�|�t�d�d�dS)N�abcdefghijklmnop��@u(�spami=��Cl
*i�Or!)r
�foorrr�test_crc32_adler32_unsigned<s
z,ChecksumTestCase.test_crc32_adler32_unsignedcCsHd}d}|�t�|�|�|�t�|�|�|�t�d�t�d��dS)Nr#r$r%)r	�binasciirr)r
r&�crcrrr�test_same_as_binascii_crc32Ds
z,ChecksumTestCase.test_same_as_binascii_crc32N)
rrrrrrr r"r'r*rrrrrs	rc@s&eZdZeedddd�dd��ZdS)�ChecksumBigBufferTestCase�rF)�size�memuse�dry_runcCs4dtd}|�t�|�d�|�t�|�d�dS)NsnyanriM"B>l�a
)rr	rrr)r
r-�datarrr�test_big_bufferOsz)ChecksumBigBufferTestCase.test_big_bufferN)rrrrrr1rrrrr+Msr+c@sBeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zej	dd��Z
d
S)�ExceptionTestCasecCs|�tjtjdd�dS)NsERROR�
)�assertRaisesr�error�compressrrrr�
test_badlevelXszExceptionTestCase.test_badlevelcCs�|�ttj�|�ttj�|�ttj�|�ttj�dddddgfD]D}|�ttj|�|�ttj|�|�ttj|�|�ttj|�qHdS)N�*��abcr)r4�	TypeErrorrrrr6�
decompress)r
�argrrr�test_badargs^szExceptionTestCase.test_badargscCs6|�ttjdtjd�|�ttjdtjtjd�dS)Nrr)r4�
ValueErrorr�compressobj�DEFLATED�	MAX_WBITSrrrr�test_badcompressobjis�z%ExceptionTestCase.test_badcompressobjcCs|�ttjd�dS)N���)r4r?r�
decompressobjrrrr�test_baddecompressobjpsz'ExceptionTestCase.test_baddecompressobjcCs,|�tt��jd�|�tt��jd�dS)NrrD)r4r?rrE�flushrrrr�test_decompressobj_badflushtsz-ExceptionTestCase.test_decompressobj_badflushc	Cs�|�td��t�ddtjd�W5QRX|�td��t���dtjd�W5QRX|�td��t���tjd�W5QRXdS)Nz
int too larger�r)�assertRaisesRegex�
OverflowErrorrr<�sys�maxsizerErGrrrr�
test_overflowys zExceptionTestCase.test_overflowN)rrrr7r>rCrFrHrZcpython_onlyrNrrrrr2Vsr2c@seZdZdd�Zdd�ZdS)�BaseCompressTestCasecsLd�d��fdd�td�D��}||t|�d}z||�W5d}XdS)N�rcs"g|]}t�d����d��qS)��little)�random�getrandbits�to_bytes)�.0�i�Z_1Mrr�
<listcomp>�s�zBBaseCompressTestCase.check_big_compress_buffer.<locals>.<listcomp>r3r)�join�range�len)r
r-Z
compress_funcr0rrXr�check_big_compress_buffer�s�z.BaseCompressTestCase.check_big_compress_buffercCs^d|}zt�|d�}W5d}X||�}z*|�t|�|�|�t|�d��d�W5d}XdS)N�xrr)rr6r	r\�strip)r
r-Zdecompress_funcr0�
compressedrrr�check_big_decompress_buffer�sz0BaseCompressTestCase.check_big_decompress_bufferN)rrrr]rarrrrrO�srOc@s�eZdZdd�Zdd�Zdd�Zdd�Zeed	d
d�dd
��Z	eed	dd�dd��Z
eedd�dd��Zdd�Z
e�ejdkd�eeddd�dd���ZdS)�CompressTestCasecCs t�t�}|�t�|�t�dS�N)rr6�HAMLET_SCENEr	r<�r
�xrrr�test_speech�s
zCompressTestCase.test_speechc	Csdtjtdd�}|�t�|�t�|�t��tjtdd�W5QRX|�tj|tjtjd�t�dS)N�)�level)r0ri)�wbits�bufsize)	rr6rdr	r<r4r;rB�DEF_BUF_SIZErerrr�
test_keywords�s
��zCompressTestCase.test_keywordscCsPtd}t�|�}|�t�t|��|�|t|�fD]}|�t�|�|�q4dS�N�)rdrr6r	�	bytearrayr<)r
r0rf�obrrr�test_speech128�s

zCompressTestCase.test_speech128cCs*t�t�}|�tjdtj|dd��dS)NzAError -5 while decompressing data: incomplete or truncated streamrD)rr6rdrJr5r<rerrr�test_incomplete_stream�s

�z'CompressTestCase.test_incomplete_streamrPrh�r-r.cCsdd�}|�||�dS)NcSst�|d�S�Nr)rr6��srrr�<lambda>�rz;CompressTestCase.test_big_compress_buffer.<locals>.<lambda>)r]�r
r-r6rrr�test_big_compress_buffer�sz)CompressTestCase.test_big_compress_buffer�cCs|�|tj�dSrc)rarr<)r
r-rrr�test_big_decompress_buffer�sz+CompressTestCase.test_big_decompress_bufferrcCs.td}t�|d�}|�t�|d|�|�dS�Nr3rrI)rdrr6r	r<)r
r-r0r`rrr�test_large_bufsize�sz#CompressTestCase.test_large_bufsizecCs0td}t�|d�}|�t�|dt��|�dSr})rdrr6r	r<�	CustomInt)r
r0r`rrr�test_custom_bufsize�sz$CompressTestCase.test_custom_bufsize��requires 64bit platform�dr,cCs:d|}z"t�|d�}|�t�|�|�W5d}}XdS�Nr^r)rr6r	r<)r
r-r0�comprrr�test_64bit_compress�s
z$CompressTestCase.test_64bit_compressN)rrrrgrmrrrsrrrzr|rr~r��unittest�
skipUnlessrLrMr�rrrrrb�s
	



rbc@s�eZdZdd�Zdd�Zdd�Zdd�Zd]d
d�Zdd�Zd^dd�Z	d_dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd �Ze�eed!�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+dIdJd8�dKdL��Z,ee+dIdMd8�dNdO��Z-e�e.j/dPkdQ�ee dRdSd8�dTdU���Z0e�e.j/dPkdQ�ee dRdJd8�dVdW���Z1e�e.j/dPkdQ�ee dRdXd8�dYdZ���Z2d[d\�Z3d
S)`�CompressObjectTestCasecCs�td}t�|�}|t|�fD]>}t��}|�|�}|��}|�tj|j�|�|||�q||ft|�t|�ffD]R\}}t�	�}	|	�
||�}
|	��}|�||
|�|�|	jt
�|�|	jt
�qvdSrn)rdrr6rpr@rGr4r5r	rEr<�assertIsInstance�unconsumed_tail�bytes�unused_data)r
ZdatasrcZdatazipr0�co�x1�x2Zv1Zv2�dco�y1�y2rrr�	test_pair�s

 z CompressObjectTestCase.test_pairc
	Cs�d}tj}d}d}tj}tj|||||dd�}tj|dd�}|�t��|jtd�W5QRX|�t��|j	t�t�d�W5QRX|�t�|�
�}|j	|tt�d�|�
�}	|�t|	�dS)	Nr{���	r)ri�methodrj�memLevel�strategy�zdict�rjr�)r0)�
max_length)
rrA�
Z_FILTEREDr@rEr4r;r6rdr<rGr\r	)
r
rir�rjr�r�r��dorf�yrrrrm�s(�z$CompressObjectTestCase.test_keywordscCspd}tj}d}d}tj}t�|||||�}|�t�}|��}t�|�}	|	�||�}
|	��}|�	t|
|�dS)Nr{r�r�)
rrAr�r@r6rdrGrEr<r	)r
rir�rjr�r�r�r�r�r�r�r�rrr�test_compressoptions
s

z+CompressObjectTestCase.test_compressoptionsc		Cs�td}t��}g}tdt|�d�D] }|�|�|||d���q$|�|���d�|�}t�	�}|�
d�|��}|��}|�|||�dS)Nror�r)rdrr@r[r\�appendr6rGrZrEr<r	)	r
r0r��bufsrW�combufr�r�r�rrr�test_compressincrementals
z/CompressObjectTestCase.test_compressincrementalFNr��@c
	Csf|pt}|d}t��}g}tdt|�|�D] }|�|�||||���q,|�|���d�|�}	t�	|	�}
|�
|
t�|�||
�t�
�}g}tdt|	�|�D]H}|�|�	|	|||���|�d|jdt|j��|�d|j�q�|�r|�|���n$|�	d�}|�r(|�|�n�q(�q|�d|jdt|j��|�d|j�|�|d�|��dS)Nrorrz"(A) uct should be b'': not %d longz"(B) uct should be b'': not %d long)rdrr@r[r\r�r6rGrZr<r�r�r	rEr�r�)
r
rG�source�cx�dcxr0r�r�rWr�Zdecombufr��chunkrrr�test_decompinc+sD


��

��z%CompressObjectTestCase.test_decompinccCs|jdd�dS�NT)rG)r�rrrr�test_decompincflushTsz*CompressObjectTestCase.test_decompincflushc	Cs�|pt}|d}t��}g}tdt|�|�D] }|�|�||||���q,|�|���d�|�}|�	|t�
|�d�t��}	g}|}
|
r�|	�
|
|�}|�t|�|kdt|�|f�|�|�|	j
}
q�|�|	���|�	|d�|�d�dS)Nrorr�compressed data failure�chunk too big (%d>%d)�Wrong data retrieved�rdrr@r[r\r�r6rGrZr	r<rE�assertFalser�)r
r�r�r�r0r�r�rWr�r��cbr�rrr�test_decompimaxWs.
��
z&CompressObjectTestCase.test_decompimaxc	Cs>td}t��}g}tdt|�d�D] }|�|�|||d���q$|�|���d�|�}|�	|t�
|�d�t��}g}|}|r�dt|�d}	|�
||	�}
|�t|
�|	kdt|
�|	f�|�|
�|j
}q�|r�|�|���n>|
�r&|�
d|	�}
|�t|
�|	kdt|
�|	f�|�|
�q�|�	|d�|�d	�dS)
Nrorr�rr�rr3r�r�r�)r
rGr0r�r�rWr�r�r�r�r�rrr�test_decompressmaxlenrs<
��
�z,CompressObjectTestCase.test_decompressmaxlencCs|jdd�dSr�)r�rrrr�test_decompressmaxlenflush�sz1CompressObjectTestCase.test_decompressmaxlenflushcCs,t��}|�t|jdd�|�d|j�dS)NrrD)rrEr4r?r<r	r�)r
r�rrr�test_maxlenmisc�sz&CompressObjectTestCase.test_maxlenmisccCsHtd}|�t|�tj�t�|d�}t��}|�|�|t	j
�|�dS�Nr3r)rdZ
assertGreaterr\rrlr6rEr	r<rLrM�r
r0r`r�rrr�test_maxlen_large�s
z(CompressObjectTestCase.test_maxlen_largecCs>td}t�|d�}t��}|�|�|t��|dd��dS)Nr3rr�)rdrr6rEr	r<rr�rrr�test_maxlen_custom�sz)CompressObjectTestCase.test_maxlen_customcCs:d}t��}|�|d�}||�|j�7}|�|jd�dS)Ns
x�KLJMrr)rrEr<r�r	)r
Zcdatar�Zddatarrr�test_clear_unconsumed_tail�s
z1CompressObjectTestCase.test_clear_unconsumed_tailcCs�ddddg}tdd�tj�d�D��}|dkr8|�d	�d
d�|D�}td}|D]�}td
�D]�}zDt�|�}|�|dd��}|�	|�}|�|dd��}	|�	�}
Wnt
d�||���YnX|�t�
d�|||	|
g��|d||f�~q^qRdS)N�
Z_NO_FLUSH�Z_SYNC_FLUSH�Z_FULL_FLUSH�Z_PARTIAL_FLUSHcss|]}t|�VqdSrc)�int)rV�vrrr�	<genexpr>�sz6CompressObjectTestCase.test_flushes.<locals>.<genexpr>�.)rr{�rh�Z_BLOCKcSs g|]}tt|�rtt|��qSr)�hasattrr�getattr)rV�optrrrrY�s
�z7CompressObjectTestCase.test_flushes.<locals>.<listcomp>rQr3i�z!Error for flush mode={}, level={}rz*Decompress failed: flush mode=%i, level=%i)�tuplerr
�splitr�rdr[r@r6rG�print�formatr	r<rZ)r
Zsync_opt�verr0�syncri�obj�a�b�c�drrr�test_flushes�s:�


���z#CompressObjectTestCase.test_flushesr�zrequires zlib.Z_SYNC_FLUSHc	Cs�ddl}t�tj�}t��}z|��}Wn:tk
rbz|��}Wntk
r\|}YnXYnX|�d�t	dd|d�}|�
|�}|�tj�}|�
||�}|�||d�dS)NrriD)�	generatorz17K random source doesn't match)rSrr@�Z_BEST_COMPRESSIONrEZWichmannHill�AttributeError�Random�seed�genblockr6rGr�r<r	)	r
rSr�r��genr0�first�secondZexpandedrrr�test_odd_flush�s 

z%CompressObjectTestCase.test_odd_flushcCs6t�tj�}|�|���t��}|�|��d�dS)Nr)rr@r�rrGrEr	)r
r�r�rrr�test_empty_flush�sz'CompressObjectTestCase.test_empty_flushcCs�t}|��}t�|�d�|�}tj|d�}|�|�|��}tj	|d�}|�
|�|�|��|�t�	�}|�tj
|j|�dS)Nr�r�)rdr�rS�shufflerZrr@r6rGrEr	r<r4r5)r
�hZwordsr�r�Zcdr�rrr�test_dictionary�s

z&CompressObjectTestCase.test_dictionarycCs�tjtd�}tjtd�}tdd�}|�|�|�tj�}|�|dd��|�tj�}|�|dd��|�tj�}|�|�|�|�|�|�|�|dd��|�|�|�|dd��dS)Nr���i�r�i����)	rr@rdrEr6rGr�r	r<)r
r�r�Zpiece�d0�d1Zd2rrr�test_dictionary_streamingsz0CompressObjectTestCase.test_dictionary_streamingcCsfd}|�t�|�d�|�tjtj|dd��t��}|�|dd��}||��7}|�|d�dS)N�x�K���Esfoo���)r	rr<r4r5rErG)r
rfr�r�rrr�!test_decompress_incomplete_streamsz8CompressObjectTestCase.test_decompress_incomplete_streamcCsld}t��}|�|j�|�|dd��|�|j�|�|dd��|�|j�|��|�|j�dS�Nr�r�)rrEr��eofr<rrG�r
rfr�rrr�test_decompress_eof)sz*CompressObjectTestCase.test_decompress_eofcCsNd}t��}|�|j�|�|dd��|�|j�|��|�|j�dSr�)rrEr�r�r<rGr�rrr�%test_decompress_eof_incomplete_stream4sz<CompressObjectTestCase.test_decompress_eof_incomplete_streamc
Csd}d}t�|�}||}dD]�}ddt|�t|�fD]�}t��}d}tdt|�|�D]r}	|	t|�krt|�|jd�|dkr�||�||	|	|��7}|�|jd�qV||�|j||	|	|�|�7}qV||�	�7}|�
|j�|�||�|�|jd�|�|j|�q6qdS)N�abcdefghijklmnopqrstuvwxyzs
0123456789)rr�rr{rr)rr6r\rEr[r	r�r<r�rGrr�)
r
r��	remainderr�rf�maxlen�stepr�r0rWrrr�test_decompress_unused_data=s.
�z2CompressObjectTestCase.test_decompress_unused_datacCs\d}tjtj|d�}|�|�|��}tjtj|d�}|�|�|��}|�||�dS)Nr�r�)rr@rBr6rGrEr<r	)r
r�r�r�r��uncomprrr�#test_decompress_raw_with_dictionaryXsz:CompressObjectTestCase.test_decompress_raw_with_dictionarycCsNd}d}t�|�}t��}|�|d�~t�|�}|�|��|dd��dS)Nr�sQWERTYUIOPASDFGHJKLZXCVBNMr)rr6rEr<r	rG)r
Zinput1Zinput2r0r�rrr�test_flush_with_freed_input`s

z2CompressObjectTestCase.test_flush_with_freed_inputrrtcCsFtd}t�|d�}t��}|�|d�|�|�|�|dd��dSr�)rdrr6rEr<r	rG)r
r-�inputr0r�rrr�test_flush_large_lengthls
z.CompressObjectTestCase.test_flush_large_lengthcCsHtd}t�|d�}t��}|�|d�|�|�t��|dd��dSr�)rdrr6rEr<r	rGr)r
r�r0r�rrr�test_flush_custom_lengthus
z/CompressObjectTestCase.test_flush_custom_lengthc
Cs�t}tttd���d�}dd�tjtjfD]�}t�tj�}g}|�	|�
|��||�}|dd�}|�	|�
|��|�	|���d�|�}|�	|�
|��|�	|���d�|�}	|�
t�|�||�|�
t�|	�||�q*dS)N�asciicSs|��Src�r�r�rrrrx�rz:CompressObjectTestCase.test_compresscopy.<locals>.<lambda>r)rdr��str�swapcaser�deepcopyrr@r�r�r6rGrZr	r<)
r
Zdata0Zdata1�funcZc0�bufs0�c1�bufs1�s0�s1rrr�test_compresscopy|s 

z(CompressObjectTestCase.test_compresscopycCsLt��}|�t�|��|�t|j�|�ttj|�|�ttj|�dSrc)	rr@r6rdrGr4r?rr)r
r�rrr�test_badcompresscopy�s
z+CompressObjectTestCase.test_badcompresscopyc
Cs�t}t�|�}|�|t�dd�tjtjfD]�}t��}g}|�|�	|dd���||�}|dd�}|�|�	|dd���d�
|�}|�|�	|dd���d�
|�}	|�||	�|�||�q,dS)NcSs|��Srcr�r�rrrrx�rz<CompressObjectTestCase.test_decompresscopy.<locals>.<lambda>� r)rdrr6r�r�rrrEr�r<rZr	)
r
r0r�rr�rr�rrrrrr�test_decompresscopy�s


z*CompressObjectTestCase.test_decompresscopycCsVt�t�}t��}|�|�|��|�t|j�|�ttj|�|�ttj	|�dSrc)
rr6rdrEr<rGr4r?rr)r
r0r�rrr�test_baddecompresscopy�s

z-CompressObjectTestCase.test_baddecompresscopyc
CsHttjd�D]4}|�ttjf��t�t�tj	�|�W5QRXqdSru)
r[�pickle�HIGHEST_PROTOCOLr4r;�
PicklingError�dumpsrr@r��r
�protorrr�test_compresspickle�sz*CompressObjectTestCase.test_compresspicklec
CsDttjd�D]0}|�ttjf��t�t��|�W5QRXqdSru)	r[r
rr4r;rrrrErrrr�test_decompresspickle�sz,CompressObjectTestCase.test_decompresspicklerPrhcs&t�d���fdd�}|�||�dS)Nrcs��|����Src)r6rGrvr�rrrx�rzACompressObjectTestCase.test_big_compress_buffer.<locals>.<lambda>)rr@r]ryrr�rrz�s
z/CompressObjectTestCase.test_big_compress_bufferr{cs$t����fdd�}|�||�dS)Ncs��|����Src)r<rGrv�r�rrrx�rzCCompressObjectTestCase.test_big_decompress_buffer.<locals>.<lambda>)rrEra)r
r-r<rrrr|�sz1CompressObjectTestCase.test_big_decompress_bufferr�r�r�r,cCsbd|}t�d�}t��}z4|�|�|��}|�|�|��}|�||�W5d}}}XdSr�)rr@rEr6rGr<r	)r
r-r0r�r�r�r�rrrr��s
z*CompressObjectTestCase.test_64bit_compresscCsfd}d|}t�|�|}t��}z0|�|�|��}|�||j�|�||�W5d}}}XdS)Nr#r^)rr6rEr<rGr	r�)r
r-r0Zunusedr�r�r�rrr�test_large_unused_data�sz-CompressObjectTestCase.test_large_unused_datar�cCsbd|}t��}z>t�|d�}|�|d�|��}|�||�|�|jd�W5d}}}XdS)Nr^rrr)rrEr6r<rGr	r�)r
r-r0r�r�r�rrr�test_large_unconsumed_tail�sz1CompressObjectTestCase.test_large_unconsumed_tailc
	Cs�tj�dd�d�d�}t|�dkr0|�d�n|d��sDd|d<ttt|��}|dk}tj	dd	d
�}|�
t�|��}|�
t�|d	�t�|r�|�
t�|d�t�|�
t�|d�t�|�tjd��t�|d
�W5QRXtjdd�}|�
|�|�t�tjd
d�}|�tjd��|�|�W5QRXtj	ddd
�}|�
t�|��}|�
t�|d�t�|�
t�|d	�t�|�r�|�
t�|d�t�|�
t�|d�t�tjdd�}|�
|�|�t�tj	ddd
�}|�
t�|��}|�
t�|d�t�tjdd�}|�
|�|�t�tj	ddd
�}|�
t�|��}|�
t�|d�t�|�
t�|d�t�tjdd�}|�
|�|�t�tj	ddd
�}|�
t�|��}	|�
t�|	d�t�|�
t�|	d�t�t�d�}|�
|�|	�t�dS)N�-rrr�r,�0rD)rr{rhr�rI)rirj�/zinvalid window size�)rjr��)i�i�����)rr
r�r\r��	isnumericr��mapr�r@r6rdrGr	r<rJr5rE)
r
r�Zsupports_wbits_0r�Zzlib15r�Zzlib9Z	deflate15Zdeflate9�gziprrr�
test_wbitss\
z!CompressObjectTestCase.test_wbits)FNr�r�)Nr�r�)F)4rrrr�rmr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�rrr�r��requires_Compress_copyrr	�requires_Decompress_copyrrrrrrzr|rLrMr�rrr!rrrrr��sl
)

 		 �
 


	



	




r�icsf|dk	r|�|�|j�||ks(|dkr,|}t�}td||�D]"}|t�fdd�t|�D��7}q>|S)Nr{rc3s|]}�dd�VqdS)r�Nr)rVrf��randintrrr�Eszgenblock.<locals>.<genexpr>)r�r&r�r[)r��lengthr�r�ZblocksrWrr%rr�<s
 r�cs4|dk	r��|�|�d����fdd�t|�D�S)N�
csg|]}�����qSr)�choice)rV�n�r�ZsourcesrrrYOsz choose_lines.<locals>.<listcomp>)r�r�r[)r�Znumberr�r�rr+r�choose_linesJs

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)rcCsdS)Nr�rrrrr�	__index__�szCustomInt.__index__N)rrrr-rrrrr�sr�__main__)#r��testrr(rr
rSrLZtest.supportrrr�
import_modulerr�r�r@r"rEr#ZTestCaserrr+r2�objectrOrbr�r�r,rdrr�mainrrrr�<module>sB
��.	-A]	A


F1le Man4ger