Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/test/__pycache__/test_zlib.cpython-39.opt-1.pyc

a

��g��@spddlZddlmZddlZddlZddlZddlZddlZddlZddl	m
Z
mZmZe�
d�Ze�ee��d�d�Ze�ee��d�d�Zejfdd	�Ze�Zeed
�o�e��jdkZGdd
�d
ej�ZGdd�dej�ZGdd�dej�ZGdd�dej�ZGdd�de �Z!Gdd�de!ej�Z"Gdd�de!ej�Z#defdd�Z$dZ%Gdd�d�Z&e'dk�rle�(�dS) �N)�support)�
bigmemtest�_1G�_4G�zlib�copyzrequires Compress.copy()zrequires Decompress.copy()cCsP|�dd�d�d�}t|�dkr.|�d�n|d��sBd|d<ttt|��S)N�-�r�.��0���)�split�len�append�	isnumeric�tuple�map�int)Zzlib_version�v�r�*/usr/local/lib/python3.9/test/test_zlib.py�_zlib_runtime_version_tuplesr�unameZs390xc@seZdZdd�ZdS)�VersionTestCasecCs|�tjdtjd�dS)Nr)�assertEqualr�ZLIB_RUNTIME_VERSION�ZLIB_VERSION��selfrrr�test_library_version.sz$VersionTestCase.test_library_versionN)�__name__�
__module__�__qualname__r rrrrr,src@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�ChecksumTestCasecCs0|�t�d�t�dd��|�t�dd��dS)N�r�abc���)rr�crc32�
assertTruerrrr�test_crc32start9sz ChecksumTestCase.test_crc32startcCs@|�t�dd�d�|�t�dd�d�|�t�dd�d�dS�Nr%rr	i�)rrr(rrrr�test_crc32empty=sz ChecksumTestCase.test_crc32emptycCs0|�t�d�t�dd��|�t�dd��dS)Nr%r	r&r')rr�adler32r)rrrr�test_adler32startBsz"ChecksumTestCase.test_adler32startcCs@|�t�dd�d�|�t�dd�d�|�t�dd�d�dSr+)rrr-rrrr�test_adler32emptyFsz"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���rrr(r-rrrr�
test_penguinsKszChecksumTestCase.test_penguinscCsTd}|�t�|�d�|�t�d�d�|�t�||�d�|�t�d�d�dS)N�abcdefghijklmnop��@u(�spami=��Cl
*i�Or0)r�foorrr�test_crc32_adler32_unsignedTs
z,ChecksumTestCase.test_crc32_adler32_unsignedcCsHd}d}|�t�|�|�|�t�|�|�|�t�d�t�d��dS)Nr2r3r4)r�binasciir(r)rr5�crcrrr�test_same_as_binascii_crc32\s
z,ChecksumTestCase.test_same_as_binascii_crc32N)
r!r"r#r*r,r.r/r1r6r9rrrrr$7s	r$c@s&eZdZeedddd�dd��ZdS)�ChecksumBigBufferTestCaserr	F)�size�memuse�dry_runcCs4dtd}|�t�|�d�|�t�|�d�dS)Nsnyanr	iM"B>l�a
)rrrr(r-)rr;�datarrr�test_big_buffergsz)ChecksumBigBufferTestCase.test_big_bufferN)r!r"r#rrr?rrrrr:esr:c@sBeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zej	dd��Z
d
S)�ExceptionTestCasecCs|�tjtjdd�dS)NsERROR�
)�assertRaisesr�error�compressrrrr�
test_badlevelpszExceptionTestCase.test_badlevelcCs�|�ttj�|�ttj�|�ttj�|�ttj�dddddgfD]D}|�ttj|�|�ttj|�|�ttj|�|�ttj|�qHdS)N�*��abcr)rB�	TypeErrorrr-r(rD�
decompress)r�argrrr�test_badargsvszExceptionTestCase.test_badargscCs6|�ttjdtjd�|�ttjdtjtjd�dS)Nr	r)rB�
ValueErrorr�compressobj�DEFLATED�	MAX_WBITSrrrr�test_badcompressobj�s�z%ExceptionTestCase.test_badcompressobjcCs|�ttjd�dS)Nr
)rBrMr�
decompressobjrrrr�test_baddecompressobj�sz'ExceptionTestCase.test_baddecompressobjcCs,|�tt��jd�|�tt��jd�dS)Nrr
)rBrMrrR�flushrrrr�test_decompressobj_badflush�sz-ExceptionTestCase.test_decompressobj_badflushcCs�|�td��$t�ddtjd�Wd�n1s60Y|�td��&t���dtjd�Wd�n1sx0Y|�td��$t���tjd�Wd�n1s�0YdS)Nz
int too larger%�r	)�assertRaisesRegex�
OverflowErrorrrJ�sys�maxsizerRrTrrrr�
test_overflow�s24zExceptionTestCase.test_overflowN)r!r"r#rErLrQrSrUrZcpython_onlyr[rrrrr@nsr@c@seZdZdd�Zdd�ZdS)�BaseCompressTestCasecCsBd}t�|d�}||t|�d}z||�Wd}nd}0dS)N�rAr	)�random�	randbytesr)rr;Z
compress_funcZ_1Mr>rrr�check_big_compress_buffer�s
z.BaseCompressTestCase.check_big_compress_buffercCsfd|}zt�|d�}Wd}nd}0||�}z.|�t|�|�|�t|�d��d�Wd}nd}0dS)N�xr	r)rrDrr�strip)rr;Zdecompress_funcr>�
compressedrrr�check_big_decompress_buffer�sz0BaseCompressTestCase.check_big_decompress_bufferN)r!r"r#r`rdrrrrr\�s
r\c@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)rrD�HAMLET_SCENErrJ�r�xrrr�test_speech�s
zCompressTestCase.test_speechcCsxtjtdd�}|�t�|�t�|�t��tjtdd�Wd�n1sN0Y|�tj|tjtjd�t�dS)N�)�level)r>rl)�wbits�bufsize)	rrDrgrrJrBrIrP�DEF_BUF_SIZErhrrr�
test_keywords�s,
��zCompressTestCase.test_keywordscCsTtd}t�|�}ts,|�t�t|��|�|t|�fD]}|�t�|�|�q8dS�N�)rgrrD�HW_ACCELERATEDr�	bytearrayrJ)rr>ri�obrrr�test_speech128�s
zCompressTestCase.test_speech128cCs*t�t�}|�tjdtj|dd��dS)NzAError -5 while decompressing data: incomplete or truncated streamr
)rrDrgrWrCrJrhrrr�test_incomplete_stream�s

�z'CompressTestCase.test_incomplete_streamr]rk�r;r<cCsdd�}|�||�dS)NcSst�|d�S�Nr	)rrD��srrr�<lambda>�r%z;CompressTestCase.test_big_compress_buffer.<locals>.<lambda>)r`�rr;rDrrr�test_big_compress_buffer�sz)CompressTestCase.test_big_compress_buffer�cCs|�|tj�dSrf)rdrrJ)rr;rrr�test_big_decompress_buffer�sz+CompressTestCase.test_big_decompress_bufferr	cCs.td}t�|d�}|�t�|d|�|�dS�NrAr	rV)rgrrDrrJ)rr;r>rcrrr�test_large_bufsize�sz#CompressTestCase.test_large_bufsizecCs0td}t�|d�}|�t�|dt��|�dSr�)rgrrDrrJ�	CustomInt)rr>rcrrr�test_custom_bufsize�sz$CompressTestCase.test_custom_bufsize��requires 64bit platform�drcCsBd|}z*t�|d�}|�t�|�|�Wd}}n
d}}0dS�Nrar)rrDrrJ)rr;r>�comprrr�test_64bit_compress�s
z$CompressTestCase.test_64bit_compressN)r!r"r#rjrprvrwrrr~r�rr�r��unittest�
skipUnlessrYrZr�rrrrre�s
	



rec@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]B}t��}|�|�}|��}|�tj|j�ts|�	|||�q||ft|�t|�ffD]R\}}t�
�}	|	�||�}
|	��}|�	||
|�|�|	j
t�|�|	jt�qzdSrq)rgrrDrtrNrTrBrCrsrrRrJ�assertIsInstance�unconsumed_tail�bytes�unused_data)rZdatasrcZdatazipr>�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�n1sh0Y|�t��"|j	t�t�d�Wd�n1s�0Y|�t�|�
�}|j	|tt�d�|�
�}	|�t|	�dS)	Nr���	r%)rl�methodrm�memLevel�strategy�zdict�rmr�)r>)�
max_length)
rrO�
Z_FILTEREDrNrRrBrIrDrgrJrTrr)
rrlr�rmr�r�r��dori�yrrrrps(�*0z$CompressObjectTestCase.test_keywordscCspd}tj}d}d}tj}t�|||||�}|�t�}|��}t�|�}	|	�||�}
|	��}|�	t|
|�dS)Nrr�r�)
rrOr�rNrDrgrTrRrJr)rrlr�rmr�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)Nrrr�r%)rgrrN�rangerrrDrT�joinrRrJr)	rr>r��bufs�i�combufr�r�r�rrr�test_compressincremental9s
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)Nrrrr%z"(A) uct should be b'': not %d longz"(B) uct should be b'': not %d long)rgrrNr�rrrDrTr�rJr�r�rrRr�r�)
rrT�source�cx�dcxr>r�r�r�r�Zdecombufr��chunkrrr�test_decompincHsD


��

��z%CompressObjectTestCase.test_decompinccCs|jdd�dS�NT)rT)r�rrrr�test_decompincflushqsz*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)Nrrrr%�compressed data failure�chunk too big (%d>%d)�Wrong data retrieved�rgrrNr�rrrDrTr�rrJrR�assertFalser�)rr�r�r�r>r�r�r�r�r��cbr�rrr�test_decompimaxts.
��
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)
Nrrrr�r%r�r	rAr�r�r�)rrTr>r�r�r�r�r�r�r�r�rrr�test_decompressmaxlen�s<
��
�z,CompressObjectTestCase.test_decompressmaxlencCs|jdd�dSr�)r�rrrr�test_decompressmaxlenflush�sz1CompressObjectTestCase.test_decompressmaxlenflushcCs,t��}|�t|jdd�|�d|j�dS)Nr%r
)rrRrBrMrJrr�)rr�rrr�test_maxlenmisc�sz&CompressObjectTestCase.test_maxlenmisccCsHtd}|�t|�tj�t�|d�}t��}|�|�|t	j
�|�dS�NrAr	)rgZ
assertGreaterrrrorDrRrrJrYrZ�rr>rcr�rrr�test_maxlen_large�s
z(CompressObjectTestCase.test_maxlen_largecCs>td}t�|d�}t��}|�|�|t��|dd��dS)NrAr	r�)rgrrDrRrrJr�r�rrr�test_maxlen_custom�sz)CompressObjectTestCase.test_maxlen_customcCs:d}t��}|�|d�}||�|j�7}|�|jd�dS)Ns
x�KLJMr	r%)rrRrJr�r)rZcdatar�Zddatarrr�test_clear_unconsumed_tail�s
z1CompressObjectTestCase.test_clear_unconsumed_tailc
Cs�gd�}tdkr|�d�dd�|D�}td}|D]�}td�D]�}zDt�|�}|�|dd��}|�|�}|�|dd��}|��}	Wntd	�	||���Yn0|�
t�d
�||||	g��|d||f�~q@q4dS)N)�
Z_NO_FLUSH�Z_SYNC_FLUSH�Z_FULL_FLUSH�Z_PARTIAL_FLUSH)r	r�rk�Z_BLOCKcSs g|]}tt|�rtt|��qSr)�hasattrr�getattr)�.0�optrrr�
<listcomp>�s
�z7CompressObjectTestCase.test_flushes.<locals>.<listcomp>�rAi�z!Error for flush mode={}, level={}r%z*Decompress failed: flush mode=%i, level=%i)
�ZLIB_RUNTIME_VERSION_TUPLErrgr�rrNrDrT�print�formatrrJr�)
rZsync_optr>�syncrl�obj�a�b�c�drrr�test_flushes�s0


���z#CompressObjectTestCase.test_flushesr�zrequires zlib.Z_SYNC_FLUSHc	Cs�ddl}t�tj�}t��}z|��}Wn6ty^z|��}WntyX|}Yn0Yn0|�d�|�	d�}|�
|�}|�tj�}|�
||�}|�||d�dS)Nrr	iDz17K random source doesn't match)r^rrN�Z_BEST_COMPRESSIONrRZWichmannHill�AttributeError�Random�seedr_rDrTr�rJr)	rr^r�r��genr>�first�secondZexpandedrrr�test_odd_flush�s 


z%CompressObjectTestCase.test_odd_flushcCs6t�tj�}|�|���t��}|�|��d�dS)Nr%)rrNr�r)rTrRr)rr�r�rrr�test_empty_flushsz'CompressObjectTestCase.test_empty_flushcCs�t}|��}t�|�d�|�}tj|d�}|�|�|��}tj	|d�}|�
|�|�|��|�t�	�}|�tj
|j|�dS)Nr%�r�)rgrr^�shuffler�rrNrDrTrRrrJrBrC)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����)	rrNrgrRrDrTr�rrJ)rr�r�Zpiece�d0�d1Zd2rrr�test_dictionary_streaming+sz0CompressObjectTestCase.test_dictionary_streamingcCsfd}|�t�|�d�|�tjtj|dd��t��}|�|dd��}||��7}|�|d�dS)N�x�K���Esfoo���)rrrJrBrCrRrT)rrir�r�rrr�!test_decompress_incomplete_stream8sz8CompressObjectTestCase.test_decompress_incomplete_streamcCsld}t��}|�|j�|�|dd��|�|j�|�|dd��|�|j�|��|�|j�dS�Nr�r�)rrRr��eofrJr)rT�rrir�rrr�test_decompress_eofEsz*CompressObjectTestCase.test_decompress_eofcCsNd}t��}|�|j�|�|dd��|�|j�|��|�|j�dSr�)rrRr�r�rJrTr�rrr�%test_decompress_eof_incomplete_streamPs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�r	rr%r)rrDrrRr�rr�rJr�rTr)r�)
rr��	remainderr�ri�maxlen�stepr�r>r�rrr�test_decompress_unused_dataYs,
�z2CompressObjectTestCase.test_decompress_unused_datacCs\d}tjtj|d�}|�|�|��}tjtj|d�}|�|�|��}|�||�dS)Nr�r�)rrNrPrDrTrRrJr)rr�r�r�r��uncomprrr�#test_decompress_raw_with_dictionarytsz:CompressObjectTestCase.test_decompress_raw_with_dictionarycCsNd}d}t�|�}t��}|�|d�~t�|�}|�|��|dd��dS)Nr�sQWERTYUIOPASDFGHJKLZXCVBNMr	)rrDrRrJrrT)rZinput1Zinput2r>r�rrr�test_flush_with_freed_input|s

z2CompressObjectTestCase.test_flush_with_freed_inputr	rxcCsFtd}t�|d�}t��}|�|d�|�|�|�|dd��dSr�)rgrrDrRrJrrT)rr;�inputr>r�rrr�test_flush_large_length�s
z.CompressObjectTestCase.test_flush_large_lengthcCsHtd}t�|d�}t��}|�|d�|�|�t��|dd��dSr�)rgrrDrRrJrrTr�)rr�r>r�rrr�test_flush_custom_length�s
z/CompressObjectTestCase.test_flush_custom_lengthc
Cs�t}tttd���d�}dd�tjtjfD]�}t�tj�}g}|�	|�
|��||�}|dd�}|�	|�
|��|�	|���d�|�}|�	|�
|��|�	|���d�|�}	|�
t�|�||�|�
t�|	�||�q*dS)N�asciicSs|��Srf�r�r�rrrr|�r%z:CompressObjectTestCase.test_compresscopy.<locals>.<lambda>r%)rgr��str�swapcaser�deepcopyrrNr�rrDrTr�rrJ)
rZdata0Zdata1�funcZc0�bufs0�c1�bufs1�s0�s1rrr�test_compresscopy�s 

z(CompressObjectTestCase.test_compresscopycCsLt��}|�t�|��|�t|j�|�ttj|�|�ttj|�dSrf)	rrNrDrgrTrBrMrr)rr�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|��Srfr�rrrrr|�r%z<CompressObjectTestCase.test_decompresscopy.<locals>.<lambda>� r%)rgrrDr�r�rrrRrrJr�r)
rr>r�rr�rr�rrr	rrr�test_decompresscopy�s


z*CompressObjectTestCase.test_decompresscopycCsVt�t�}t��}|�|�|��|�t|j�|�ttj|�|�ttj	|�dSrf)
rrDrgrRrJrTrBrMrr)rr>r�rrr�test_baddecompresscopy�s

z-CompressObjectTestCase.test_baddecompresscopyc	Cs\ttjd�D]H}|�ttjf��$t�t�tj	�|�Wd�q1sL0YqdSry)
r��pickle�HIGHEST_PROTOCOLrBrI�
PicklingError�dumpsrrNr��r�protorrr�test_compresspickle�sz*CompressObjectTestCase.test_compresspicklec	CsXttjd�D]D}|�ttjf�� t�t��|�Wd�q1sH0YqdSry)	r�rrrBrIrrrrRrrrr�test_decompresspickle�sz,CompressObjectTestCase.test_decompresspickler]rkcs&t�d���fdd�}|�||�dS)Nr	cs��|����Srf)rDrTrzrrrr|�r%zACompressObjectTestCase.test_big_compress_buffer.<locals>.<lambda>)rrNr`r}rrrr~�s
z/CompressObjectTestCase.test_big_compress_bufferrcs$t����fdd�}|�||�dS)Ncs��|����Srf)rJrTrz�r�rrr|�r%zCCompressObjectTestCase.test_big_decompress_buffer.<locals>.<lambda>)rrRrd)rr;rJrrrr��sz1CompressObjectTestCase.test_big_decompress_bufferr�r�r�rcCsnd|}t�d�}t��}z@|�|�|��}|�|�|��}|�||�Wd}}}nd}}}0dSr�)rrNrRrDrTrJr)rr;r>r�r�r�r�rrrr��s
z*CompressObjectTestCase.test_64bit_compresscCsrd}d|}t�|�|}t��}z<|�|�|��}|�||j�|�||�Wd}}}nd}}}0dS)Nr2ra)rrDrRrJrTrr�)rr;r>Zunusedr�r�r�rrr�test_large_unused_datasz-CompressObjectTestCase.test_large_unused_datar�cCsnd|}t��}zJt�|d�}|�|d�|��}|�||�|�|jd�Wd}}}nd}}}0dS)Nrarr	r%)rrRrDrJrTrr�)rr;r>r�r�r�rrr�test_large_unconsumed_tailsz1CompressObjectTestCase.test_large_unconsumed_tailc	Cs�tdk}tjddd�}|�t�|��}|�t�|d�t�|rT|�t�|d�t�|�t�|d�t�|�tj	d��t�|d�Wd�n1s�0Ytj
dd	�}|�|�|�t�tj
dd	�}|�tj	d��|�|�Wd�n1s�0Ytjdd
d�}|�t�|��}|�t�|d
�t�|�t�|d�t�|�rf|�t�|d�t�|�t�|d�t�tj
dd	�}|�|�|�t�tjddd�}|�t�|��}|�t�|d�t�tj
dd	�}|�|�|�t�tjdd
d�}|�t�|��}|�t�|d
�t�|�t�|d�t�tj
d
d	�}|�|�|�t�tjddd�}|�t�|��}|�t�|d�t�|�t�|d�t�t�
d�}|�|�|�t�dS)N)r	rrkr�r	rV)rlrmr�/zinvalid window size�)rmr��)i�i�����)r�rrNrDrgrTrrJrWrCrR)	rZsupports_wbits_0r�Zzlib15r�Zzlib9Z	deflate15Zdeflate9�gziprrr�
test_wbitssP*(
z!CompressObjectTestCase.test_wbits)FNr�r�)Nr�r�)F)4r!r"r#r�rpr�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_copyr
r�requires_Decompress_copyr
rrrrr~r�rYrZr�rrrrrrrr��sl
)

 		�
 


	



	




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�Tr%z choose_lines.<locals>.<listcomp>)r�rr�)r��numberr�r&rr%r�choose_linesOs

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)r�cCsdS)Nr�rrrrr�	__index__�szCustomInt.__index__N)r!r"r#r)rrrrr��sr��__main__))r��testrr7r�osrr^rYZtest.supportrrr�
import_modulerr�r�rNr rRr!rrr�r�machinersZTestCaserr$r:r@�objectr\rer�r(rgr�r!�mainrrrr�<module>sH
��
.	-DVA


Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists