Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.227.48.91
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_zlib.cpython-310.pyc
o

ab;��@sJddlZddlmZddlmZddlZddlZddlZddlZddl	Z	ddlm
Z
mZmZe�
d�Ze�ee��d�d�Ze�ee��d�d�ZGd	d
�d
ej�ZGdd�dej�ZGd
d�dej�ZGdd�dej�ZGdd�de�ZGdd�deej�ZGdd�deej�Zdefdd�ZdZGdd�d�Z e!dkr�e�"�dSdS)�N)�support)�
import_helper)�
bigmemtest�_1G�_4G�zlib�copyzrequires Compress.copy()zrequires Decompress.copy()c@�eZdZdd�ZdS)�VersionTestCasecCs|�tjdtjd�dS)Nr)�assertEqualr�ZLIB_RUNTIME_VERSION�ZLIB_VERSION��self�r�7/usr/local/python-3.10/lib/python3.10/test/test_zlib.py�test_library_versionsz$VersionTestCase.test_library_versionN)�__name__�
__module__�__qualname__rrrrrr
sr
c@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�ChecksumTestCasecC�0|�t�d�t�dd��|�t�dd��dS)N�r�abc���)rr�crc32�
assertTruerrrr�test_crc32start#�z ChecksumTestCase.test_crc32startcC�@|�t�dd�d�|�t�dd�d�|�t�dd�d�dS�Nrr�i�)rrrrrrr�test_crc32empty'�z ChecksumTestCase.test_crc32emptycCr)Nrr!rr)rr�adler32rrrrr�test_adler32start,rz"ChecksumTestCase.test_adler32startcCrr )rrr$rrrr�test_adler32empty0r#z"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 !�Kr!i���Ci��i���rrrr$rrrr�
test_penguins5s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)rr,�crcrrr�test_same_as_binascii_crc32Fs
z,ChecksumTestCase.test_same_as_binascii_crc32N)
rrrrr"r%r&r(r-r0rrrrr!s	rc@s&eZdZeedddd�dd��ZdS)�ChecksumBigBufferTestCase�r!F)�size�memuse�dry_runcCs4dtd}|�t�|�d�|�t�|�d�dS)Nsnyanr!iM"B>l�a
)rrrrr$)rr3�datarrr�test_big_bufferQsz)ChecksumBigBufferTestCase.test_big_bufferN)rrrrrr7rrrrr1Osr1c@sPeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zej	dd��Z
ej	d
d��ZdS)�ExceptionTestCasecCs|�tjtjdd�dS)NsERROR�
)�assertRaisesr�error�compressrrrr�
test_badlevelZszExceptionTestCase.test_badlevelcCs�|�ttj�|�ttj�|�ttj�|�ttj�dddddgfD]"}|�ttj|�|�ttj|�|�ttj|�|�ttj|�q$dS)N�*��abcr)r:�	TypeErrorrr$rr<�
decompress)r�argrrr�test_badargs`s�zExceptionTestCase.test_badargscCs6|�ttjdtjd�|�ttjdtjtjd�dS)Nr!r)r:�
ValueErrorr�compressobj�DEFLATED�	MAX_WBITSrrrr�test_badcompressobjks�z%ExceptionTestCase.test_badcompressobjcCs|�ttjd�dS)N���)r:rEr�
decompressobjrrrr�test_baddecompressobjrsz'ExceptionTestCase.test_baddecompressobjcCs,|�tt��jd�|�tt��jd�dS)NrrJ)r:rErrK�flushrrrr�test_decompressobj_badflushvsz-ExceptionTestCase.test_decompressobj_badflushcCs�|�td��t�ddtjd�Wd�n1swY|�td��t���dtjd�Wd�n1s<wY|�td��t���tjd�Wd�dS1s]wYdS)Nz
int too larger�r!)�assertRaisesRegex�
OverflowErrorrrB�sys�maxsizerKrMrrrr�
test_overflow{s��"�zExceptionTestCase.test_overflowcCs,t�|tt����t�|tt����dS�N)rZcheck_disallow_instantiation�typerrFrKrrrr�test_disallow_instantiation�sz-ExceptionTestCase.test_disallow_instantiationN)rrrr=rDrIrLrNrZcpython_onlyrTrWrrrrr8Xs
r8c@seZdZdd�Zdd�ZdS)�BaseCompressTestCasecCs@d}t�|d�}||t|�d}z	||�Wd}dSd}w)N�r9r!)�random�	randbytes�len)rr3Z
compress_funcZ_1Mr6rrr�check_big_compress_buffer�s
z.BaseCompressTestCase.check_big_compress_buffercCsdd|}z
t�|d�}Wd}nd}w||�}z|�t|�|�|�t|�d��d�Wd}dSd}w)N�xr!r)rr<rr\�strip)rr3Zdecompress_funcr6�
compressedrrr�check_big_decompress_buffer�sz0BaseCompressTestCase.check_big_decompress_bufferN)rrrr]rarrrrrX�s
rXc@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�dSrU)rr<�HAMLET_SCENErrB�r�xrrr�test_speech�s
zCompressTestCase.test_speechcCsxtjtdd�}|�t�|�t�|�t��tjtdd�Wd�n1s'wY|�tj|tjtjd�t�dS)N�)�level)r6rh)�wbits�bufsize)	rr<rcrrBr:rArH�DEF_BUF_SIZErdrrr�
test_keywords�s�
��zCompressTestCase.test_keywordscCsPtd}t�|�}|�t�t|��|�|t|�fD]}|�t�|�|�qdS�N�)rcrr<r�	bytearrayrB)rr6re�obrrr�test_speech128�s
�zCompressTestCase.test_speech128cCs*t�t�}|�tjdtj|dd��dS)NzAError -5 while decompressing data: incomplete or truncated streamrJ)rr<rcrPr;rBrdrrr�test_incomplete_stream�s

�z'CompressTestCase.test_incomplete_streamrYrg�r3r4cCsdd�}|�||�dS)NcSst�|d�S�Nr!)rr<��srrr�<lambda>�sz;CompressTestCase.test_big_compress_buffer.<locals>.<lambda>)r]�rr3r<rrr�test_big_compress_buffer�sz)CompressTestCase.test_big_compress_buffer�cCs|�|tj�dSrU)rarrB)rr3rrr�test_big_decompress_buffer�sz+CompressTestCase.test_big_decompress_bufferr!cCs.td}t�|d�}|�t�|d|�|�dS�Nr9r!rO)rcrr<rrB)rr3r6r`rrr�test_large_bufsize�sz#CompressTestCase.test_large_bufsizecCs0td}t�|d�}|�t�|dt��|�dSr|)rcrr<rrB�	CustomInt)rr6r`rrr�test_custom_bufsize�sz$CompressTestCase.test_custom_bufsize��requires 64bit platform�dr2cCs@d|}zt�|d�}|�t�|�|�Wd}}dSd}}w�Nr^r)rr<rrB)rr3r6�comprrr�test_64bit_compress�s
z$CompressTestCase.test_64bit_compressN)rrrrfrlrqrrrrryr{rr}r�unittest�
skipUnlessrRrSr�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])\}}t�	�}	|	�
||�}
|	��}|�||
|�|�|	jt
�|�|	jt
�q;dSrm)rcrr<rorFrMr:r;rrKrB�assertIsInstance�unconsumed_tail�bytes�unused_data)rZdatasrcZdatazipr6�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�Wd�n1s4wY|�t��|j	t�t�d�Wd�n1sRwY|�t�|�
�}|j	|tt�d�|�
�}	|�t|	�dS)	Nrz���	r)rh�methodri�memLevel�strategy�zdict�rir�)r6)�
max_length)
rrG�
Z_FILTEREDrFrKr:rAr<rcrBrMr\r)
rrhr�rir�r�r��dore�yrrrrl�s,���z$CompressObjectTestCase.test_keywordscCspd}tj}d}d}tj}t�|||||�}|�t�}|��}t�|�}	|	�||�}
|	��}|�	t|
|�dS)Nrzr�r�)
rrGr�rFr<rcrMrKrBr)rrhr�rir�r�r�r�r�r�r�r�rrr�test_compressoptionss

z+CompressObjectTestCase.test_compressoptionsc		Cs�td}t��}g}tdt|�d�D]}|�|�|||d���q|�|���d�|�}t�	�}|�
d�|��}|��}|�|||�dS)Nrnr�r)rcrrF�ranger\�appendr<rM�joinrKrBr)	rr6r��bufs�i�combufr�r�r�rrr�test_compressincremental#s
z/CompressObjectTestCase.test_compressincrementalFNr��@c
	Cs`|pt}|d}t��}g}tdt|�|�D]}|�|�||||���q|�|���d�|�}	t�	|	�}
|�
|
t�|�||
�t�
�}g}tdt|	�|�D]$}|�|�	|	|||���|�d|jdt|j��|�d|j�qR|r�|�|���n	|�	d�}|r�|�|�nq�q�|�d|jdt|j��|�d|j�|�|d�|��dS)Nrnrrz"(A) uct should be b'': not %d longTz"(B) uct should be b'': not %d long)rcrrFr�r\r�r<rMr�rBr�r�rrKr�r�)
rrM�source�cx�dcxr6r�r�r�r�Zdecombufr��chunkrrr�test_decompinc2sH


��
�
��z%CompressObjectTestCase.test_decompinccC�|jdd�dS�NT)rM)r�rrrr�test_decompincflush[�z*CompressObjectTestCase.test_decompincflushc	Cs�|pt}|d}t��}g}tdt|�|�D]}|�|�||||���q|�|���d�|�}|�	|t�
|�d�t��}	g}|}
|
rg|	�
|
|�}|�t|�|kdt|�|f�|�|�|	j
}
|
sG|�|	���|�	|d�|�d�dS)Nrnrr�compressed data failure�chunk too big (%d>%d)�Wrong data retrieved�rcrrFr�r\r�r<rMr�rrBrK�assertFalser�)rr�r�r�r6r�r�r�r�r��cbr�rrr�test_decompimax^s0
��
�z&CompressObjectTestCase.test_decompimaxc	Cs@td}t��}g}tdt|�d�D]}|�|�|||d���q|�|���d�|�}|�	|t�
|�d�t��}g}|}|rkdt|�d}	|�
||	�}
|�t|
�|	kdt|
�|	f�|�|
�|j
}|sC|ru|�|���n|
r�|�
d|	�}
|�t|
�|	kdt|
�|	f�|�|
�|
sw|�	|d�|�d	�dS)
Nrnrr�rr�r!r9r�r�r�)rrMr6r�r�r�r�r�r�r�r�rrr�test_decompressmaxlenys@
��
��
�z,CompressObjectTestCase.test_decompressmaxlencCr�r�)r�rrrr�test_decompressmaxlenflush�r�z1CompressObjectTestCase.test_decompressmaxlenflushcCs,t��}|�t|jdd�|�d|j�dS)NrrJ)rrKr:rErBrr�)rr�rrr�test_maxlenmisc�sz&CompressObjectTestCase.test_maxlenmisccCsHtd}|�t|�tj�t�|d�}t��}|�|�|t	j
�|�dS�Nr9r!)rcZ
assertGreaterr\rrkr<rKrrBrRrS�rr6r`r�rrr�test_maxlen_large�s
z(CompressObjectTestCase.test_maxlen_largecCs>td}t�|d�}t��}|�|�|t��|dd��dS)Nr9r!r�)rcrr<rKrrBr~r�rrr�test_maxlen_custom�s"z)CompressObjectTestCase.test_maxlen_customcCs:d}t��}|�|d�}||�|j�7}|�|jd�dS)Ns
x�KLJMr!r)rrKrBr�r)rZcdatar�Zddatarrr�test_clear_unconsumed_tail�s
z1CompressObjectTestCase.test_clear_unconsumed_tailcCs�gd�}tdd�tj�d�D��}|dkr|�d�dd�|D�}td	}|D]N}td
�D]G}z"t�|�}|�|dd��}|�	|�}|�|dd��}	|�	�}
Wnt
d�||���|�t�
d
�|||	|
g��|d||f�~q-q'dS)N)�
Z_NO_FLUSH�Z_SYNC_FLUSH�Z_FULL_FLUSH�Z_PARTIAL_FLUSHcss�|]}t|�VqdSrU)�int)�.0�vrrr�	<genexpr>�s�z6CompressObjectTestCase.test_flushes.<locals>.<genexpr>�.)r!rz�rg�Z_BLOCKcSs g|]}tt|�rtt|��qSr)�hasattrr�getattr)r��optrrr�
<listcomp>�s�z7CompressObjectTestCase.test_flushes.<locals>.<listcomp>�r9i�z!Error for flush mode={}, level={}rz*Decompress failed: flush mode=%i, level=%i)�tuplerr�splitr�rcr�rFr<rM�print�formatrrBr�)rZsync_opt�verr6�syncrh�obj�a�b�c�drrr�test_flushes�s6


�����z#CompressObjectTestCase.test_flushesr�zrequires zlib.Z_SYNC_FLUSHc	Cs�ddl}t�tj�}t��}z|��}Wnty/z|��}Wnty,|}YnwYnw|�d�|�	d�}|�
|�}|�tj�}|�
||�}|�||d�dS)Nrr!iDz17K random source doesn't match)rZrrF�Z_BEST_COMPRESSIONrKZWichmannHill�AttributeError�Random�seedr[r<rMr�rBr)	rrZr�r��genr6�first�secondZexpandedrrr�test_odd_flush�s&���


z%CompressObjectTestCase.test_odd_flushcCs6t�tj�}|�|���t��}|�|��d�dS)Nr)rrFr�rrMrKr)rr�r�rrr�test_empty_flush�sz'CompressObjectTestCase.test_empty_flushcCs�t}|��}t�|�d�|�}tj|d�}|�|�|��}tj	|d�}|�
|�|�|��|�t�	�}|�tj
|j|�dS)Nr�r�)rcr�rZ�shuffler�rrFr<rMrKrrBr:r;)r�h�wordsr�r�Zcdr�rrr�test_dictionarys

z&CompressObjectTestCase.test_dictionarycCs�tjtd�}tjtd�}tdd�}|�|�|�tj�}|�|dd��|�tj�}|�|dd��|�tj�}|�|�|�|�|�|�|�|dd��|�|�|�|dd��dS)Nr���i�r�i����)	rrFrcrKr<rMr�rrB)rr�r�Zpiece�d0�d1Zd2rrr�test_dictionary_streamingsz0CompressObjectTestCase.test_dictionary_streamingcCsfd}|�t�|�d�|�tjtj|dd��t��}|�|dd��}||��7}|�|d�dS)N�x�K���Esfoo���)rrrBr:r;rKrM)rrer�r�rrr�!test_decompress_incomplete_stream#sz8CompressObjectTestCase.test_decompress_incomplete_streamcCsld}t��}|�|j�|�|dd��|�|j�|�|dd��|�|j�|��|�|j�dS�Nr�r�)rrKr��eofrBrrM�rrer�rrr�test_decompress_eof0sz*CompressObjectTestCase.test_decompress_eofcCsNd}t��}|�|j�|�|dd��|�|j�|��|�|j�dSr�)rrKr�r�rBrMr�rrr�%test_decompress_eof_incomplete_stream;sz<CompressObjectTestCase.test_decompress_eof_incomplete_streamc
Csd}d}t�|�}||}dD]w}ddt|�t|�fD]j}t��}d}tdt|�|�D]9}	|	t|�kr:|�|jd�|dkrS||�||	|	|��7}|�|jd�q+||�|j||	|	|�|�7}q+||�	�7}|�
|j�|�||�|�|jd�|�|j|�qqdS)N�abcdefghijklmnopqrstuvwxyzs
0123456789)rr�r!rzrr)rr<r\rKr�rr�rBr�rMrr�)
rr��	remainderr�re�maxlen�stepr�r6r�rrr�test_decompress_unused_dataDs0
���z2CompressObjectTestCase.test_decompress_unused_datacCs\d}tjtj|d�}|�|�|��}tjtj|d�}|�|�|��}|�||�dS)Nr�r�)rrFrHr<rMrKrBr)rr�r�r�r��uncomprrr�#test_decompress_raw_with_dictionary_sz:CompressObjectTestCase.test_decompress_raw_with_dictionarycCsNd}d}t�|�}t��}|�|d�~t�|�}|�|��|dd��dS)Nr�sQWERTYUIOPASDFGHJKLZXCVBNMr!)rr<rKrBrrM)rZinput1Zinput2r6r�rrr�test_flush_with_freed_inputgs

z2CompressObjectTestCase.test_flush_with_freed_inputr!rscCsFtd}t�|d�}t��}|�|d�|�|�|�|dd��dSr�)rcrr<rKrBrrM)rr3�inputr6r�rrr�test_flush_large_lengthss
z.CompressObjectTestCase.test_flush_large_lengthcCsHtd}t�|d�}t��}|�|d�|�|�t��|dd��dSr�)rcrr<rKrBrrMr~)rr�r6r�rrr�test_flush_custom_length|s
 z/CompressObjectTestCase.test_flush_custom_lengthc
Cs�t}tttd���d�}dd�tjtjfD]Z}t�tj�}g}|�	|�
|��||�}|dd�}|�	|�
|��|�	|���d�|�}|�	|�
|��|�	|���d�|�}	|�
t�|�||�|�
t�|	�||�qdS)N�asciicS�|��SrU�r�r�rrrrw��z:CompressObjectTestCase.test_compresscopy.<locals>.<lambda>r)rcr��str�swapcaser�deepcopyrrFr�r�r<rMr�rrB)
rZdata0Zdata1�funcZc0�bufs0�c1�bufs1�s0�s1rrr�test_compresscopy�s"

�z(CompressObjectTestCase.test_compresscopycCsLt��}|�t�|��|�t|j�|�ttj|�|�ttj|�dSrU)	rrFr<rcrMr:rErr	)rr�rrr�test_badcompresscopy�s
z+CompressObjectTestCase.test_badcompresscopyc
Cs�t}t�|�}|�|t�dd�tjtjfD]L}t��}g}|�|�	|dd���||�}|dd�}|�|�	|dd���d�
|�}|�|�	|dd���d�
|�}	|�||	�|�||�qdS)NcSrrUrrrrrrw�rz<CompressObjectTestCase.test_decompresscopy.<locals>.<lambda>� r)rcrr<r�r�rr	rKr�rBr�r)
rr6r�r
r�rr�r
rrrrr�test_decompresscopy�s 


�z*CompressObjectTestCase.test_decompresscopycCsVt�t�}t��}|�|�|��|�t|j�|�ttj|�|�ttj	|�dSrU)
rr<rcrKrBrMr:rErr	)rr6r�rrr�test_baddecompresscopy�s

z-CompressObjectTestCase.test_baddecompresscopyc	Cs\ttjd�D]$}|�ttjf��t�t�tj	�|�Wd�n1s&wYqdSrt)
r��pickle�HIGHEST_PROTOCOLr:rA�
PicklingError�dumpsrrFr��r�protorrr�test_compresspickle�s���z*CompressObjectTestCase.test_compresspicklec	CsXttjd�D]"}|�ttjf��t�t��|�Wd�n1s$wYqdSrt)	r�rrr:rArrrrKrrrr�test_decompresspickle�s���z,CompressObjectTestCase.test_decompresspicklerYrgcs&t�d���fdd�}|�||�dS)Nr!c���|����SrU)r<rMrurrrrw��zACompressObjectTestCase.test_big_compress_buffer.<locals>.<lambda>)rrFr]rxrrrry�s
z/CompressObjectTestCase.test_big_compress_bufferrzcs$t����fdd�}|�||�dS)NcrrU)rBrMru�r�rrrw�rzCCompressObjectTestCase.test_big_decompress_buffer.<locals>.<lambda>)rrKra)rr3rBrrrr{�sz1CompressObjectTestCase.test_big_decompress_bufferr�r�r�r2cCsld|}t�d�}t��}z!|�|�|��}|�|�|��}|�||�Wd}}}dSd}}}wr�)rrFrKr<rMrBr)rr3r6r�r�r�r�rrrr��s
z*CompressObjectTestCase.test_64bit_compresscCspd}d|}t�|�|}t��}z|�|�|��}|�||j�|�||�Wd}}}dSd}}}w)Nr)r^)rr<rKrBrMrr�)rr3r6Zunusedr�r�r�rrr�test_large_unused_data�sz-CompressObjectTestCase.test_large_unused_datar�cCsld|}t��}z&t�|d�}|�|d�|��}|�||�|�|jd�Wd}}}dSd}}}w)Nr^rr!r)rrKr<rBrMrr�)rr3r6r�r�r�rrr�test_large_unconsumed_tail�sz1CompressObjectTestCase.test_large_unconsumed_tailc
Cstj�dd�d�d�}t|�dkr|�d�n
|d��s"d|d<ttt|��}|dk}tj	dd	d
�}|�
t�|��}|�
t�|d	�t�|rS|�
t�|d�t�|�
t�|d�t�|�tjd��t�|d
�Wd�n1suwYtjdd�}|�
|�|�t�tjd
d�}|�tjd��
|�|�Wd�n1s�wYtj	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�-r!rr�r2�0rJ)r!rzrgr�rO)rhri�/zinvalid window size�)rir��)i�i�����)rrr�r\r��	isnumericr��mapr�rFr<rcrMrrBrPr;rK)
rr�Zsupports_wbits_0r�Zzlib15r�Zzlib9Z	deflate15Zdeflate9�gziprrr�
test_wbits	s`��
z!CompressObjectTestCase.test_wbits)FNr�r�)Nr�r�)F)4rrrr�rlr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�rrrr�requires_Compress_copyrr�requires_Decompress_copyrrrrrryr{rRrSr�r r!r+rrrrr��sn
)

 		 �
 


	



	




r�cs4|dur	��|�|�d����fdd�t|�D�S)z=Return a list of number lines randomly chosen from the sourceN�
csg|]}�����qSr)�choice)r��n��	generatorZsourcesrrr�Hsz choose_lines.<locals>.<listcomp>)r�r�r�)r�Znumberr�r2rr1r�choose_linesCs

r3s�
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@r	)r~cCsdS)Nr�rrrrr�	__index__�szCustomInt.__index__N)rrrr4rrrrr~�sr~�__main__)#r��testrZtest.supportrr.rrrZrRrrr�
import_modulerr�r�rFr,rKr-ZTestCaser
rr1r8�objectrXrbr�r3rcr~r�mainrrrr�<module>sF
��.	3A]A�
© 2025 GrazzMean