a ze_@sddlZddlZddlmZmZmZddlZddlZddlZddl Z ddl Z ddl m Z ddl Z ddlmZmZmZmZmZedZddlmZmZmZmZGddde jZGd d d e jZGd d d ZGd dde jZGddde jZGddde jZdZ dZ!dZ"dZ#ej$ddgZ%dZ&ej'ddej$ej(ej)BdgZ*dZ+ej,dddej$igZ-d Z.ej'd!dej/d"dej$d!dd#gZ0d$Z1d%Z2e3d&kre 4dS)'N)BytesIOUnsupportedOperationDEFAULT_BUFFER_SIZE)support)_4GTESTFN import_module bigmemtestunlinklzma)LZMACompressorLZMADecompressor LZMAErrorLZMAFilec@s@eZdZddZddZddZddZdGd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zej e!e"d:d;d<d=d>Z#ej e!e"d:d?d<d@dAZ$dBdCZ%ej&dDdEZ'dFS)HCompressorDecompressorTestCasecCsR|ttg|jttdd|jttdd|jttdd|jttdd|jtttjd|t$td d tjigd Wdn1s0Y|ttd |jttd d|tttjddWdn1s0Y|tttjddWdn1s$0Y|jttt d|tttj t dWdn1sn0Y|tttj t dWdn1s0Yt}|t|j |t|j dd|t|j d| }|t|j d|t|j t}|t|j|t|jdd|||t|jddS)Ng @formatcheckZasdfpresetfiltersidrrsqwmemlimitZzzzrrfoobarsblahsquux) assertRaises TypeErrorr ValueErrorr FORMAT_AUTO FILTER_LZMA2r FORMAT_RAW FILTERS_RAW_1 FORMAT_XZ FORMAT_ALONEcompressflush decompressEOFError)selflzcemptylzdrrB/opt/bitninja-python-dojo/embedded/lib/python3.9/test/test_lzma.pytest_simple_bad_argss> 2 , . . . z3CompressorDecompressorTestCase.test_simple_bad_argscCs|jttdgd|jttddigd|jttddigd|t$ttjddgdWdn1sr0Y|t$ttjddgdWdn1s0Y|t$ttjddgdWdn1s0YdS) Nwobsiterxyzzyrŕrrfoo)r%r&r r'r r) FILTER_DELTA FILTER_X86r2rrr6test_bad_filter_spec@s 2 2 z3CompressorDecompressorTestCase.test_bad_filter_speccCs$t}|t|t|jddS)Nsnyan)r r0 COMPRESSED_XZr%r1r2r5rrr6test_decompressor_after_eofKs z:CompressorDecompressorTestCase.test_decompressor_after_eofcCsZtdd}|t|jtttjdd}|t|jtttjdd}|t|jtdS)Nr) r r%rr0rAr r,r-COMPRESSED_ALONErBrrr6test_decompressor_memlimitPs  z9CompressorDecompressorTestCase.test_decompressor_memlimitcCsN||j||}||t||j|||j||j|dSN) assertFalseeofr0 assertEqualINPUTr assertTrue unused_data)r2r5datarrNoutrrr6_test_decompressor\s     z1CompressorDecompressorTestCase._test_decompressorcCs0t}||ttjt}||ttjdSrH)r rQrAr CHECK_CRC64rE CHECK_NONErBrrr6test_decompressor_autodsz5CompressorDecompressorTestCase.test_decompressor_autocCsttj}||ttjdSrH)r r r,rQrArRrBrrr6test_decompressor_xzks z3CompressorDecompressorTestCase.test_decompressor_xzcCsttj}||ttjdSrH)r r r-rQrErSrBrrr6test_decompressor_aloneos z6CompressorDecompressorTestCase.test_decompressor_alonecCs"ttjtd}||ttjdSNr)r r r*r+rQCOMPRESSED_RAW_1rSrBrrr6test_decompressor_raw_1ssz6CompressorDecompressorTestCase.test_decompressor_raw_1cCs"ttjtd}||ttjdSrW)r r r* FILTERS_RAW_2rQCOMPRESSED_RAW_2rSrBrrr6test_decompressor_raw_2wsz6CompressorDecompressorTestCase.test_decompressor_raw_2cCs"ttjtd}||ttjdSrW)r r r* FILTERS_RAW_3rQCOMPRESSED_RAW_3rSrBrrr6test_decompressor_raw_3{sz6CompressorDecompressorTestCase.test_decompressor_raw_3cCs"ttjtd}||ttjdSrW)r r r* FILTERS_RAW_4rQCOMPRESSED_RAW_4rSrBrrr6test_decompressor_raw_4sz6CompressorDecompressorTestCase.test_decompressor_raw_4c Cst}g}tdttdD],}||j||t||dqd|}| |t | |j t j ||j| |jddSNr rGr rangelenrArIrJappendr0joinrKrLrr rRrMrNr2r5rPirrr6test_decompressor_chunkss    z7CompressorDecompressorTestCase.test_decompressor_chunksc Cst}g}tdttdD]\}||j||d||d||d||t||dqd|}| |t | |j t j ||j| |jddSrcrerjrrr6test_decompressor_chunks_emptys    z=CompressorDecompressorTestCase.test_decompressor_chunks_emptycCs"t}d}g}ttd}||jtd||d||j|t|d|||jd|d||j|t|d|||jt|d|d|t|d||j s||jd|d|t|d|qd |}||t ||j t j||jddS)Nd max_lengthrG)r rgrArhr0rI needs_inputrKassertLessEqualrJrirLrr rRrN)r2r5rqrPZlen_rrr6 test_decompressor_chunks_maxsizes.     z?CompressorDecompressorTestCase.test_decompressor_chunks_maxsizecCst}g}||jtddddd||dd||tddd||tdd|d|tdS)NrnrrprGroir rKr0rArhrirLr2r5rPrrr6test_decompressor_inputbuf_1sz;CompressorDecompressorTestCase.test_decompressor_inputbuf_1cCst}g}||jtddddd||d||tddd||tddd||tdd|d|tdS)NrrprGiro,rxryrrr6test_decompressor_inputbuf_2sz;CompressorDecompressorTestCase.test_decompressor_inputbuf_2cCslt}g}||tddd||tddd||tdd|d|tdS)Nr{r|rG)r rhr0rArKrirLryrrr6test_decompressor_inputbuf_3s z;CompressorDecompressorTestCase.test_decompressor_inputbuf_3cCs&t}d}|j|t|tj|ddS)Ns fooblibarrN)r rQrAr rR)r2r5extrarrr6test_decompressor_unused_datas zCompressDecompressFunctionTestCase.test_decompress_multistreamcCsttt}||tdSrHr r0rArrKrLrrrr6test_decompress_trailing_junksz@CompressDecompressFunctionTestCase.test_decompress_trailing_junkcCs&ttdt}||tddS)Nrrrrrr6)test_decompress_multistream_trailing_junkszLCompressDecompressFunctionTestCase.test_decompress_multistream_trailing_junkN) rrrrrrrrrrrrrrrr6r~s  rc@s&eZdZd ddZddZddZdS) TempFilerGcCs||_||_dSrH)filenamerO)r2rrOrrr6rszTempFile.__init__cCs<t|jd}||jWdn1s.0YdS)Nwb)openrwriterOr2frrr6 __enter__ szTempFile.__enter__cGst|jdSrH)r r)r2argsrrr6__exit__szTempFile.__exit__N)rG)rrrrrrrrrr6rs rc@seZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Zd;d<Z d=d>Z!d?d@Z"dAdBZ#dCdDZ$dEdFZ%dGdHZ&dIdJZ'dKdLZ(dMdNZ)dOdPZ*dQdRZ+dSdTZ,dUdVZ-dWdXZ.dYdZZ/d[d\Z0d]d^Z1d_d`Z2dadbZ3dcddZ4dedfZ5dgdhZ6didjZ7dkdlZ8dmdnZ9dodpZ:dqdrZ;dsdtZdydzZ?d{d|Z@d}S)~ FileTestCasecCsttt}Wdn1s"0Yttd}Wdn1sN0Yttd}Wdn1sz0Yttd}Wdn1s0YdS)Nwxa)rrrArrrr6 test_initszFileTestCase.test_initc Cstt}t|tt| }||tWdn1sD0Yt|d}| tWdn1sx0Yt|$}||tdWdn1s0YWdn1s0YdS)Nrro) pathlibPathrrrArrKreadrLr)r2rrrrr6 test_init_with_PathLike_filename s   . ( z-FileTestCase.test_init_with_PathLike_filenamec Csttttt}Wdn1s*0Yttd}Wdn1sT0Yttd}Wdn1s~0YWdn1s0YdS)Nrr)rrrArrrrr6test_init_with_filename*s    z$FileTestCase.test_init_with_filenamec Cs,tt ttdWdn1s,0YttdWdn1sV0YttdWdn1s0YttdWdn1s0YttdWdn1s0YttdWdn1s0YWdn1s0YdS)Nrrbrrrab)rrrr?rrr6test_init_mode3s       zFileTestCase.test_init_modec Cs|ttdD]}tttt|Wdn1s<0Y|t:tt|Wdn1sr0YWdq1s0YqdS)N)rxb) addCleanupr rrr%FileExistsErrorr2moderrr6test_init_with_x_modeBs    z"FileTestCase.test_init_with_x_modecCsz|ttttdWdn1s.0Y|ttttdWdn1sf0Y|ttttdWdn1s0Y|ttttdWdn1s0Y|ttttdWdn1s0Y|ttttdWdn1sJ0Y|ttttdWdn1s0Y|ttttdWdn1s0Y|ttttd Wdn1s0Y|ttttd Wdn1s20Y|ttttd Wdn1sl0YdS) N)rrrxtzx+rxZwxrtzr+wtzw+rw)r%r'rrrAr?rrr6test_init_bad_modeLs, , , , , . . . . . . zFileTestCase.test_init_bad_modecCs|t ttdddWdn1s00Y|t"ttdtjdWdn1sl0Y|t&ttdtjddWdn1s0Y|t"ttt tj dWdn1s0Y|t"ttt tj dWdn1s&0Y|t"ttt tj dWdn1sd0Y|t"ttt tj dWdn1s0Y|t"ttt tjdWdn1s0YdS)Nrsasdrr)r%r&rrrr CHECK_UNKNOWN CHECK_ID_MAXr'rArS CHECK_CRC32rR CHECK_SHA256r?rrr6test_init_bad_checkds  . 0 4 0 2 2 2 z FileTestCase.test_init_bad_checkcCs|t ttdddWdn1s00Y|t ttdddWdn1sj0Y|t ttdddWdn1s0Y|t ttdddWdn1s0Y|t ttdddWdn1s0Y|t ttdddWdn1sV0Y|t tttd dWdn1s0YdS) Nrg(\@rrdrrir<r)r%r&rrr OverflowErrorr'rAr?rrr6test_init_bad_presetxs . . . . 0 0 z!FileTestCase.test_init_bad_presetcCs|t"ttddgdWdn1s20Y|t&ttdddigdWdn1sr0Y|t&ttdddigdWdn1s0Y|t*ttdtjdd gdWdn1s0Y|t*ttdtjdd gdWdn1s<0Y|t*ttdtjdd gdWdn1s0YdS) Nrr8rr9rrr:rr;) r%r&rrr'r r)r=r>r?rrr6test_init_bad_filter_specs$ 0 4 4  $  &  z&FileTestCase.test_init_bad_filter_speccCsD|t&ttdtjdtdWdn1s60YdS)Nr)rrr)r%r'rrr r*r+r?rrr6!test_init_with_preset_and_filterss  z.FileTestCase.test_init_with_preset_and_filterscCstt@}t|}|||j|||jWdn1sN0Yttt:tt}|j}|| |j|Wdn1s0YdSrH) rrArcloserIclosedrr_fprM)r2srcrfprrr6 test_closes  *  zFileTestCase.test_closecCsttt}z,||j|||jW|n |0||jttd}z||jW|n |0||jdSNr)rrrArIrrrrMrrrr6 test_closeds    zFileTestCase.test_closedc Csttt}z|t|jW|n |0|t|jtt tVtt }z2| ||j | |t W|n |0Wdn1s0Y|t|jdSrH)rrrAr%rfilenorr'rrrKrZassertIsInstanceintrrrr6 test_filenos  2zFileTestCase.test_filenocCsttt}z0|||||W|n |0|t|jttd}z| |W|n |0|t|jtt}dd|_t|}z| |W|n |0|t|jdS)NrcSsdS)NFrrrrr6rGz,FileTestCase.test_seekable..) rrrArMseekablerrr%r'rI)r2rrrrr6 test_seekables&   zFileTestCase.test_seekablecCsttt}z0|||||W|n |0|t|jttd}z| |W|n |0|t|jdSr) rrrArMreadablerrr%r'rIrrrr6 test_readables  zFileTestCase.test_readablecCsttt}z0|||||W|n |0|t|jttd}z| |W|n |0|t|jdSr) rrrArIwritablerrr%r'rMrrrr6 test_writables  zFileTestCase.test_writablecCsttt0}||t||dWdn1sB0Yttt }||tWdn1s~0Yttttjd0}||t||dWdn1s0Yttttj d0}||t||dWdn1s$0Yttt tj t d0}||t||dWdn1sz0Yttt tj td0}||t||dWdn1s0Yttttj td0}||t||dWdn1s&0Yttttj td0}||t||dWdn1s|0YdS)NrGrr")rrrArKrrLrEr r,r-rXr*r+r[rZr^r]rar`rrrr6 test_readsF...0000zFileTestCase.test_readcCsttt"}||ddWdn1s40Yttt"}||ddWdn1sr0Yttttjd"}||ddWdn1s0Yttttjd"}||ddWdn1s0YdS)NrrGr) rrrArKrrEr r,r-rrrr6 test_read_0-s000zFileTestCase.test_read_0cCsrtttR}g}|d}|s"q>|t|d||q|d|t Wdn1sd0YdSNrdrG) rrrArrtrgrhrKrirL)r2rchunksresultrrr6 test_read_107s  zFileTestCase.test_read_10cCstttd$}||tdWdn1s:0Ytttt$}||tdWdn1s~0Ytttdtj t d$}||tdWdn1s0YdS)Nr~ror") rrrArKrrLrEr^r r*r]rrrr6test_read_multistreamBs22 z"FileTestCase.test_read_multistreamcCsltj}ttt_zNtttd$}||tdWdn1sL0YW|t_n|t_0dSNr~) _compression BUFFER_SIZErgrArrrKrrL)r2Zsaved_buffer_sizerrrr6)test_read_multistream_buffer_size_alignedKs  4z6FileTestCase.test_read_multistream_buffer_size_alignedcCsDtttt }||tWdn1s60YdSrHrrrArrKrrLrrrr6test_read_trailing_junkVsz$FileTestCase.test_read_trailing_junkcCsLtttdt$}||tdWdn1s>0YdSrrrrrr6#test_read_multistream_trailing_junkZsz0FileTestCase.test_read_multistream_trailing_junkc CsvtttXtt0}||t||dWdn1sJ0YWdn1sh0YdSNrG)rrrArrKrrLrrrr6test_read_from_file^s  z FileTestCase.test_read_from_filec Csztd}Wnty*|dYn0tttXt|0}||t ||dWdn1sv0YWdn1s0YdS)Nascii%Temporary file name needs to be ASCIIrG) rencodeUnicodeEncodeErrorskipTestrrArrKrrL)r2bytes_filenamerrrr6'test_read_from_file_with_bytes_filenameds   z4FileTestCase.test_read_from_file_with_bytes_filenamecCsFtttdd}|t|jWdn1s80YdS)Nr)rrrAr%r1rrrrr6test_read_incompletensz!FileTestCase.test_read_incompletec Cstdd}tt|}|t|jWdn1s<0Ytt|6}||ttt|t|jdWdn1s0Yt dD]H}tt|d| }|t|jdWdq1s0YqdS)Nir ) rArrr%r1rrKrgrLrf)r2Z truncatedrrkrrr6test_read_truncatedrs ,. z FileTestCase.test_read_truncatedcCsttt}||t|jttd}|t|jWdn1sR0Yttt"}|t|jtWdn1s0YdSr) rrrArr%r'rr&floatrrrr6test_read_bad_argss ,zFileTestCase.test_read_bad_argscCs>ttt}|t|jWdn1s00YdSrH)rrrr%rrrrrr6test_read_bad_dataszFileTestCase.test_read_bad_datacCsptttP}g}|}|s q,||q|d|t||dWdn1sb0YdSr rrrAread1rhrKrirLr2rZblocksrrrr6 test_read1s zFileTestCase.test_read1cCsBttt"}||ddWdn1s40YdS)NrrG)rrrArKrrrrr6 test_read1_0szFileTestCase.test_read1_0cCsrtttR}g}|d}|s"q.||q|d|t||dWdn1sd0YdSrrrrrr6 test_read1_10s  zFileTestCase.test_read1_10cCsxtttdT}g}|}|s$q0||q|d|td||dWdn1sj0YdS)Nr~rGrrrrr6test_read1_multistreams z#FileTestCase.test_read1_multistreamcCsttt}||t|jttd}|t|jWdn1sR0Yttt }|t|jdWdn1s0YdSr)rrrArr%r'rr&rrrr6test_read1_bad_argss ,z FileTestCase.test_read1_bad_argscCstttH}|}|t|d|t|| | tWdn1sZ0YtttJ}|d}|t|d|t|| | tWdn1s0YdS)Nrrd) rrrApeekZ assertGreaterrgrMrL startswithrKr)r2rrrrr6 test_peeks. zFileTestCase.test_peekcCs>ttd}|t|jWdn1s00YdSr)rrr%r'r"rrrr6test_peek_bad_argsszFileTestCase.test_peek_bad_argscCstt}|}Wdn1s&0Yttt$}|tt||Wdn1sf0Yttt$}|tt||Wdn1s0Ytttt j d$}|tt||Wdn1s0Ytttt j d$}|tt||Wdn1s40Yttt t j td$}|tt||Wdn1s~0YdSr)rrL readlinesrrAassertListEquallistiterrEr r,r-r[r*rZr2rlinesrrr6 test_iterators &2224zFileTestCase.test_iteratorcCsztt}|}Wdn1s&0Yttt*}|D]}|||qBWdn1sl0YdSrH)rrLr&rrArKreadline)r2rr+linerrr6 test_readlines  &zFileTestCase.test_readlinecCsptt}|}Wdn1s&0Yttt }|||Wdn1sb0YdSrH)rrLr&rrAr'r*rrr6test_readliness &zFileTestCase.test_readlinescCshtjdtddd}|t|tjtt|}| | dddt }| |j j|ddS)Ng>Arrrz)Excessive amount of data was decompressed)r r.rZ assertLessrgrrrrrKrrrt_bufferrawtell)r2ZbombdecompZ max_decomprrr6test_decompress_limiteds z$FileTestCase.test_decompress_limitedc Cst^}t|d}|tWdn1s20Ytt}|||Wdn1sj0Ytj}t|dtjd}|tWdn1s0Ytjttjd}|||Wdn1s0Ytl}t|dtj d}|tWdn1s.0Ytjttj d}|||Wdn1sn0Ytp}t|dtj t d}|tWdn1s0Ytjttj t d}|||Wdn1s0YdS)Nrrr") rrrrLr r.rKgetvaluer,r-r*rZ)r2dstrexpectedrrr6 test_writes2 ( .(.*0 * zFileTestCase.test_writec Cst}t|d<}tdttdD]}|t||dq$Wdn1sT0Ytt}|| |Wdn1s0YdS)Nrrrd) rrrfrgrLrr r.rKr7)r2r8rstartr9rrr6 test_write_10 s  6 zFileTestCase.test_write_10c Cstdd}tdd}tdd}ddd|||fD}t}t|d}||Wdn1sp0Yt|d}||Wdn1s0Yt|d}||Wdn1s0Y|||Wdn1s0YdS)NrDrGcss|]}t|VqdSrHr r..0rrrr6 rGz1FileTestCase.test_write_append..rr)rLrirrrrKr7)r2part1part2part3r9r8rrrr6test_write_appends    ( ( (zFileTestCase.test_write_appendcCszttd}|tWdn1s,0Ytt}ttd }|||Wdn1sp0YWt tn t t0dS)Nrr) rrrrLr r.rrKrr )r2rr9rrr6test_write_to_file s (  0zFileTestCase.test_write_to_filecCsztd}Wnty*|dYn0zt|d}|tWdn1sX0Ytt}t td }| | |Wdn1s0YWt tn t t0dS)Nr rrr) rrrrrrrLr r.rrKrr )r2rrr9rrr6&test_write_to_file_with_bytes_filename*s  (  0z3FileTestCase.test_write_to_file_with_bytes_filenamecCs2tdd}tdd}tdd}ddd|||fD}zttd}||Wdn1sj0Yttd}||Wdn1s0Yttd}||Wdn1s0Yttd }|||Wdn1s0YWttn tt0dS) NrDr=rGcss|]}t|VqdSrHr>r?rrr6rA<rGz9FileTestCase.test_write_append_to_file..rrr) rLrirrrrrKrr )r2rBrCrDr9rrrr6test_write_append_to_file8s    ( ( ( 2z&FileTestCase.test_write_append_to_filecCsttd}||t|jdtttd }|t|jdWdn1sX0Yttd@}|t|jd|t|jd|t|jdWdn1s0YdS)Nrr#rr$texti)rrrr%r'rrAr&rrrr6test_write_bad_argsIs .z FileTestCase.test_write_bad_argsc Cstt}|}Wdn1s&0Yt^}t|d}||Wdn1sb0Ytt}|||Wdn1s0YdSr) rrLr&r writelinesr r.rKr7)r2rr+r8r9rrr6test_writelinesTs & ( zFileTestCase.test_writelinescCsRttt2}|d||tddWdn1sD0YdS)Ni+rrrAseekrKrrLrrrr6test_seek_forward]s zFileTestCase.test_seek_forwardcCs^tttd:}|ttd||tddWdn1sP0YdS)Nro{)rrrArNrgrLrKrrrrr6 test_seek_forward_across_streamsbsz-FileTestCase.test_seek_forward_across_streamscCs^ttt>}|d|dd||tddWdn1sP0YdS)Nrniri8rrrArrNrKrLrrrr6%test_seek_forward_relative_to_currentgs  z2FileTestCase.test_seek_forward_relative_to_currentcCsTttt4}|dd||tddWdn1sF0YdS)NirorMrrrr6!test_seek_forward_relative_to_endms z.FileTestCase.test_seek_forward_relative_to_endcCs\ttt<}|d|d||tddWdn1sN0YdS)NirRrrrr6test_seek_backwardrs  zFileTestCase.test_seek_backwardcCsltttdH}|ttd|d||tddtWdn1s^0YdS)NroiMi)rrrArrgrLrNrKrrrr6!test_seek_backward_across_streamsxs z.FileTestCase.test_seek_backward_across_streamscCsTttt4}|dd||tddWdn1sF0YdS)NijrorMrrrr6"test_seek_backward_relative_to_end~s z/FileTestCase.test_seek_backward_relative_to_endcCsftttF}|ttd||tt||dWdn1sX0YdS)N)#rG) rrrArNrgrLrKr4rrrrr6test_seek_past_endszFileTestCase.test_seek_past_endcCsZttt:}|d||d||tWdn1sL0YdS)Nir)rrrArNrKr4rrLrrrr6test_seek_past_starts z!FileTestCase.test_seek_past_startcCsttt}||t|jdttd }|t|jdWdn1sV0YtttX}|t|jdd|ttf|jdd|t|jd|t|jdWdn1s0YdS)Nrrr rsderp)rrrArr%r'rNr&rrrr6test_seek_bad_argss .zFileTestCase.test_seek_bad_argscCstttV}d}||||d}|s2q@|t|7}q||ttWdn1sh0Yttd`}tdttdD]*}|||| t||dq||ttWdn1s0YdS)Nrr) rrrArKr4rrgrLrfr)r2rposrrrr6 test_tells 2zFileTestCase.test_tellcCs&ttt}||t|jdSrH)rrrArr%r'r4rrrr6test_tell_bad_argss zFileTestCase.test_tell_bad_argscCst}|jtdd}|t|d||jt}|jtdd}||j||j|d}|t|d||j||||dS)Nrrrpih3i]3rG ) r r0ISSUE_21872_DATrKrgrMrJrIrs)r2Zd1ZentireZd2Zout1Zout2rrr6test_issue21872s     zFileTestCase.test_issue21872cCsptdgd}t||j}ttd2}|||||||Wdn1sb0YdS)NQ)rrorrr~r)arrayrgitemsizerrrKrr4)r2qZLENGTHrrrr6test_issue44439s zFileTestCase.test_issue44439N)Arrrrrrrrrrrrrrrrrrrrrrrrr r r rrrrrrrrr r!r$r%r,r/r0r6r:r<rErFrGrHrJrLrOrQrSrTrVrWrXrZr[r]rarbrerjrrrr6rs|                    rc@s\eZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ dS) OpenTestCasec Cstttd }||tWdn1s60Yt}t|d}|tWdn1st0Yt| }||tt|d}|tWdn1s0Yt| }||tdWdn1s0YdS)Nrrrro) r rrrArKrrLrr0r7)r2rbio file_datarrr6test_binary_modess.( (zOpenTestCase.test_binary_modesc Cs4td}|dtj}tttd }| | |Wdn1sN0Yt}t|d}| |Wdn1s0Yt | d}| ||t|d}| |Wdn1s0Yt | d}| ||dWdn1s&0YdS)Nr  rrZatro)rLdecodereplaceoslinesepr rrrArKrrr0r7)r2 uncompresseduncompressed_rawrrlrmrrr6test_text_modess .( (zOpenTestCase.test_text_modesc Cs^tt>ttd}|tWdn1s80Yttd*}t|}||tWdn1s|0Yttd }||tWdn1s0Yttd}|tWdn1s0Yttd$}||tdWdn1s00YWdn1sP0YdS)Nrrrro) rrr rrrLr0rrK)r2rrmrrr6 test_filenames ( *.(zOpenTestCase.test_filenamec Cstt}t|t|d}|tWdn1s@0Yt|d*}t| }| |tWdn1s0Yt|d }| | tWdn1s0YWdn1s0YdS)Nrr) rrrrr rrrLr0rrK)r2rrrmrrr6test_with_pathlike_filenames  ( *z(OpenTestCase.test_with_pathlike_filenamecCs |tttdWdn1s,0Y|tttdWdn1sb0Y|t tjtdddWdn1s0Y|t tjtdddWdn1s0Y|t tjtddd Wdn1s0YdS) NrZrbtrzutf-8encodingignore)errorsronewline)r%r'r rrr?rrr6test_bad_paramss * * . . zOpenTestCase.test_bad_paramsc Cstjtd}tjttdfi| }||tWdn1sJ0Ytp}tj|dfi|}| tWdn1s0Ytj | fi|}||tWdn1s0YdS)Nr"rr) r r*r+rrrXrKrrLrr0r7)r2optionsrrlrmrrr6test_format_and_filterss .(z$OpenTestCase.test_format_and_filtersc Cstd}|dtj}t}tj|ddd}||Wdn1sP0Yt | d}| ||| dtj|ddd }| | |Wdn1s0YWdn1s0YdS)Nr rorz utf-16-leryrr)rLrprqrrrsrr rrr0r7rKrNr)r2rtrurlrrmrrr6 test_encoding's (  zOpenTestCase.test_encodingc CstttdR}tj|dddd }||dWdn1sH0YWdn1sf0YdS)Nsfoobarrr r{)rzr|Zfoobar)rr r.rrKr)r2rlrrrr6test_encoding_error_handler4sz(OpenTestCase.test_encoding_error_handlerc Cstd}t}tj|ddd}||Wdn1sB0Y|dtj|ddd"}|||gWdn1s0YWdn1s0YdS)Nr rror}rr ) rLrprr rrrNrKr&)r2rIrlrrrr6 test_newline:s ( zOpenTestCase.test_newlinec Cs|ttdD]}tttt|Wdn1s>0Y|t<tt|Wdn1sv0YWdq1s0YqdS)N)rrr)rr rr rr%rrrrr6 test_x_modeDs  zOpenTestCase.test_x_modeN) rrrrnrvrwrxrrrrrrrrrr6rks      rkc@s,eZdZddZddZddZddZd S) MiscellaneousTestCasecCsP|ttj|ttj|ttjd|ttjdSr)rMr is_check_supportedrSrrIrrr?rrr6test_is_check_supportedQsz-MiscellaneousTestCase.test_is_check_supportedcCs|ttdWdn1s*0Y|ttddiWdn1sb0Y|t"ttjddWdn1s0Y|tj"ttjddWdn1s0Yttjdd d d d }| |d dS)Ns not a dictrr)rZjunkrYrdistrorr)rpblplc dict_size]) r%r&r _encode_filter_propertiesr'r)rr= FILTER_LZMA1rK)r2Zpropsrrr6test__encode_filter_properties]s$ ( , 0&z4MiscellaneousTestCase.test__encode_filter_propertiescCs|t"ttjdtiWdn1s20Y|tjttjdWdn1sl0Yttjd}| |dtj| |dd| |dd| |d d | |d d dS) Nz should bestoo longrrrrorrrrrr) r%r&r _decode_filter_propertiesr>bytesrr=rrK)r2Z filterspecrrr6test__decode_filter_propertiesrs 0,z4MiscellaneousTestCase.test__decode_filter_propertiescCs6ttjd}t|}ttj|}|||dS)Nr)r rrrrK)r2Zspec1Z reencodedZspec2rrr6 test_filter_properties_roundtrips  z6MiscellaneousTestCase.test_filter_properties_roundtripN)rrrrrrrrrrr6rOs rs 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. sthis is not a valid lzma streams 7zXZִF!t/]bXn䴝o 2h\6(wd"u.n򎍏/=/Mާz-]rZo#z/FMt6 BF$Ql,bn ԨNȆ3x2O@Q/OozSt<I#ud6Y]-Pee: 7 pJV%G=?(΂=I3 R isPX2jLbc-HoJliQk ?@xH12Puw㾪iWЀ#cb5]d WlUGyF7v5h8W5:?rD5@7cԗitSkKvy6Te ]:kla4r}r*z8hӼl-KZL3Ϝ!^9w PPKdZ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