python (3.12.0)

(root)/
lib/
python3.12/
test/
__pycache__/
test_lzma.cpython-312.opt-2.pyc

ΑeA`ddlZddlZddlmZmZmZddlZddlZddlZddl	Z	ddl
Z
ddlmZddl
Z
ddlmZmZddlmZddlmZmZedZddlmZmZmZmZGd	d
e
j6ZGdde
j6ZGd
dZGdde
j6ZGdde
j6Z Gdde
j6Z!dZ"dZ#dZ$dZ%ejLddgZ'dZ(ejRddejLejTejVzdgZ,dZ-ej\dd d!ejLigZ/d"Z0ejRd#dejbd$d ejLd#dd%gZ2d&Z3d'Z4e5d(k(re
jlyy))N)BytesIOUnsupportedOperationDEFAULT_BUFFER_SIZE)support)_4G
bigmemtest)
import_module)TESTFNunlinklzma)LZMACompressorLZMADecompressor	LZMAErrorLZMAFilecneZdZdZdZdZdZd'dZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZej@e!e"dzdd Z#ej@e!e"dzd!d"Z$d#Z%ejLd$Z'd%Z(y&)(CompressorDecompressorTestCasecf|jttg|jttd|jttd|jttd|jttd|jtttj
|jt5td	d
tjigddd|jttd|jttd
|jt5ttjdddd|jt5ttjdddd|jttt|jt5ttjtddd|jt5ttjtdddt}|jt|j|jt|jdd|jt|jd|j}|jt|jd|jt|jt}|jt|j|jt|jdd|j||jt|jdy#1swYxYw#1swY'xYw#1swYxYw#1swYxYw#1swY{xYw)Ng@formatcheckasdfpresetfiltersidrrsqwmemlimitzzzrrfoobarsblahsquux)assertRaises	TypeErrorr

ValueErrorrFORMAT_AUTOFILTER_LZMA2r
FORMAT_RAW
FILTERS_RAW_1	FORMAT_XZFORMAT_ALONEcompressflush
decompressEOFError)selflzcemptylzds    B/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_lzma.pytest_simple_bad_argsz3CompressorDecompressorTestCase.test_simple_bad_argss)^R8)^DA)^2>)^FC)^Q?*nT=M=MN


z
*	J!tT5F5F.G-HI	J	
)%5r:)%5F


y
)	=T__e<	=

z
*	BT__yA	B	
*&6
N


z
*	KDNNMJ	K


z
*	ND$5$5}M	N)S\\2)S\\66B)SYY8		*cllG<*cii0 )S^^4)S^^VVDu(CNNG<;	J	J
	=	=	B	B	K	K	N	Ns<M2>M?7N N
 N&2M<?N	NN#&N0cj|jttdg|jttddig|jttddig|jt5ttj
ddgddd|jt5ttjddgddd|jt5ttjddgdddy#1swYxYw#1swYRxYw#1swYyxYw)	Nwobsiterxyzzyrr ́rr foo)r*r+r
r,rr.FILTER_DELTA
FILTER_X86r7s r;test_bad_filter_specz3CompressorDecompressorTestCase.test_bad_filter_specBs
)^j\J*n|nM*ne}oN


z
*	J4+<+<Q$G#HI	J


z
*	J4+<+<Q$G#HI	J


z
*	H4??1$E#FG	H	H		J	J	J	J	H	Hs$1D-D)D)DD&)D2ct}|jt|jt|jdy)Nsnyan)rr5
COMPRESSED_XZr*r6r7r:s  r;test_decompressor_after_eofz:CompressorDecompressorTestCase.test_decompressor_after_eofMs, }%(CNNG<cftd}|jt|jttt
jd}|jt|jttt
jd}|jt|jty)Nr#)	rr*rr5rHrr1r2COMPRESSED_ALONErIs  r;test_decompressor_memlimitz9CompressorDecompressorTestCase.test_decompressor_memlimitRsq-)S^^]Ct~~=)S^^]Ct004@)S^^5EFrKc.|j|j|j|}|j|t|j|j
||j
|j|j|j|yN)assertFalseeofr5assertEqualINPUTr
assertTrueunused_data)r7r:datarrWouts      r;_test_decompressorz1CompressorDecompressorTestCase._test_decompressor^sj!nnT"e$E* +6rKct}|j|ttjt}|j|t
tjyrQ)rrZrHrCHECK_CRC64rN
CHECK_NONErIs  r;test_decompressor_autoz5CompressorDecompressorTestCase.test_decompressor_autofsA ]D4D4DE %5tGrKcttj}|j|ttj
yrQ)rrr1rZrHr\rIs  r;test_decompressor_xzz3CompressorDecompressorTestCase.test_decompressor_xzms(t~~.]D4D4DErKcttj}|j|ttj
yrQ)rrr2rZrNr]rIs  r;test_decompressor_alonez6CompressorDecompressorTestCase.test_decompressor_aloneqs)t001%5tGrKcttjt}|j	|t
tjyNr)rrr/r0rZCOMPRESSED_RAW_1r]rIs  r;test_decompressor_raw_1z6CompressorDecompressorTestCase.test_decompressor_raw_1u)t
F%5tGrKcttjt}|j	|t
tjyrd)rrr/
FILTERS_RAW_2rZCOMPRESSED_RAW_2r]rIs  r;test_decompressor_raw_2z6CompressorDecompressorTestCase.test_decompressor_raw_2yrgrKcttjt}|j	|t
tjyrd)rrr/
FILTERS_RAW_3rZCOMPRESSED_RAW_3r]rIs  r;test_decompressor_raw_3z6CompressorDecompressorTestCase.test_decompressor_raw_3}rgrKcttjt}|j	|t
tjyrd)rrr/
FILTERS_RAW_4rZCOMPRESSED_RAW_4r]rIs  r;test_decompressor_raw_4z6CompressorDecompressorTestCase.test_decompressor_raw_4rgrKc	t}g}tdttdD]G}|j	|j
|j
|jt||dzIdj|}|j|t|j|jtj|j|j
|j|jdyNr
rKrrangelenrHrRrSappendr5joinrTrUrrr\rVrWr7r:rYis    r;test_decompressor_chunksz7CompressorDecompressorTestCase.test_decompressor_chunkss q#m,b1	>ASWW%JJs~~mAad&;<=	>hhsme$D$4$45 #.rKc	t}g}tdttdD]}|j	|j
|j
|jd|j
|jd|j
|jd|j
|jt||dzdj|}|j|t|j|jtj|j|j
|j|jdyrurwr|s    r;test_decompressor_chunks_emptyz=CompressorDecompressorTestCase.test_decompressor_chunks_emptys q#m,b1	>ASWW%JJs~~c*+JJs~~c*+JJs~~c*+JJs~~mAad&;<=	>hhsme$D$4$45 #.rKct}d}g}ttdz}|j|j	td|||j|j|jt|d||j|j	d||j|j|jt|d||j|j	t|d||jt|d||jsM|j|j	d||jt|d||jsMdj|}|j|t|j|jtj|j|jdy)Nd
max_lengthrK)rryrHrzr5rRneeds_inputrTassertLessEqualrSr{rUrrr\rW)r7r:rrYlen_s     r; test_decompressor_chunks_maxsizez?CompressorDecompressorTestCase.test_decompressor_chunks_maxsizes 
=!Q&

3>>-"6-7"9	:)SWz2	

3>>#*>=>)SWz2	

3>>-"6-7"9	:SR\:6''JJs~~cj~AB  SWz:''hhsme$D$4$45#.rKct}g}|j|jtdddd|j	|jdd|j	|jtddd|j	|jtdd|jdj|ty)NrrrrKrirrTr5rHrzr{rUr7r:rYs   r;test_decompressor_inputbuf_1z;CompressorDecompressorTestCase.test_decompressor_inputbuf_1s 	

ds(;34(67:	<
	

3>>#q)*	

3>>-C"8"=>	

3>>-"567#.rKct}g}|j|jtdddd|j	|jd|j	|jtddd|j	|jtddd|j	|jtdd|jdj|ty)NrrrKir,rrs   r;test_decompressor_inputbuf_2z;CompressorDecompressorTestCase.test_decompressor_inputbuf_2s 	

ds(;34(67:	<

3>>#&'	

3>>-C"8!<=	

3>>-C"8!<=	

3>>-"567#.rKcTt}g}|j|jtddd|j|jtddd|j|jtdd|j	dj|ty)NrrrK)rrzr5rHrTr{rUrs   r;test_decompressor_inputbuf_3z;CompressorDecompressorTestCase.test_decompressor_inputbuf_3s 	

3>>-"5q9:	

3>>-C"8!<=	

3>>-"567#.rKcpt}d}|j|t|ztj|y)Ns	fooblibarrW)rrZrHrr\)r7r:extras   r;test_decompressor_unused_dataz<CompressorDecompressorTestCase.test_decompressor_unused_datas6 ]U%:D<L<L,1	 	3rKct}|jt|jttt
j}|jt|jttt
j}|jt|jttt
jt}|jt|jtyrd)rr*rr5rerr1rNr2rHr/r0rIs  r;test_decompressor_bad_inputz:CompressorDecompressorTestCase.test_decompressor_bad_inputs )S^^5EFt~~.)S^^5EFt001)S^^]Ct
F)S^^]CrKct}|jt|jt|jt|jtyrQ)rr*rr5rerIs  r;test_decompressor_bug_28275z:CompressorDecompressorTestCase.test_decompressor_bug_28275s8 )S^^5EF)S^^5EFrKct}|jt|jz}t	}|j||tjyrQ)r
r3rUr4rrZrr\r7r8cdatar:s    r;test_roundtrip_xzz0CompressorDecompressorTestCase.test_roundtrip_xzsCU#ciik1 UD,<,<=rKcttj}|jt|jz}t
}|j||tjyrQ)	r
rr2r3rUr4rrZr]rs    r;test_roundtrip_alonez3CompressorDecompressorTestCase.test_roundtrip_alonesIT../U#ciik1 UDOO<rKcttjt}|j	t
|j
z}ttjt}|j||tjyrd
r
rr/rqr3rUr4rrZr]rs    r;test_roundtrip_rawz1CompressorDecompressorTestCase.test_roundtrip_raw#sQT__mDU#ciik1t
FUDOO<rKcttjt}|j	t
}||j	dz
}||j	dz
}||j	dz
}||j
z
}ttjt}|j||tjy)NrrKrrs    r;test_roundtrip_raw_emptyz7CompressorDecompressorTestCase.test_roundtrip_raw_empty)sT__mDU#
c""
c""
c""
t
FUDOO<rKc	dt}g}tdttdD],}|j	|jt||dz.|j	|j
dj|}t}|j||tjyrur
rxryrUrzr3r4r{rrZrr\r7r8rr}r:s     r;test_roundtrip_chunksz4CompressorDecompressorTestCase.test_roundtrip_chunks3sq#e*b)	6ALLeAadm45	6
SYY[! UD,<,<=rKc	$t}g}tdttdD]}|j	|jt||dz|j	|jd|j	|jd|j	|jd|j	|j
dj|}t}|j||tjyrurrs     r;test_roundtrip_empty_chunksz:CompressorDecompressorTestCase.test_roundtrip_empty_chunks=sq#e*b)	,ALLeAadm45LLc*+LLc*+LLc*+		,
	SYY[! UD,<,<=rKc|t}|j|ttztj
ty)Nr)rrZrHrNrr\rIs  r;test_decompressor_multistreamz<CompressorDecompressorTestCase.test_decompressor_multistreamLs4 ]5E%E $ 0 0>N	 	PrKrr)sizememusec*t}|jd|z|jz}tj	|}	|jt
|||jt
|jddd}y#d}wxYw)Nxr)r
r3r4rr5rTrystrip)r7rr8rddatas     r;test_compressor_bigmemz5CompressorDecompressorTestCase.test_compressor_bigmemSsyTD[)CIIK7&	SZ.ST!23Q7EDEs
ABBrc
t}td|}tj|}	||dz
|zdzz}tj|}|j
|}|j||dx}x}}y#dx}x}}wxYw)Ni)rminrandom	randbytesrr3r5rT)r7rr:	blocksizeblockinputrrs        r;test_decompressor_bigmemz7CompressorDecompressorTestCase.test_decompressor_bigmem_s ($/	  +	)d1f2Q67EMM%(ENN5)EUE*$((E(EED(E(EEsAA::BcfttjdzD]z}|jt5tj
t
|ddd|jt5tj
t|ddd|y#1swYHxYw#1swYxYwNr)rxpickleHIGHEST_PROTOCOLr*r+dumpsr
r)r7protos  r;test_picklez*CompressorDecompressorTestCase.test_pickleos622Q67	8E""9-
6^-u5
6""9-
8-/7
8
8	8
6
6
8
8sB1B'B$	'B0	ctjtd}t}|}t	dD]}|j|j
||z
ddy)Ngettotalrefcountrrrv)delta)r
get_attributesysrrx__init__assertAlmostEqual)r7rr:refs_beforer}s     r;&test_refleaks_in_decompressor___init__zECompressorDecompressorTestCase.test_refleaks_in_decompressor___init__vs`"006HI &(s	ALLN	/1K?"MrKc|jtjtjt	dyNrK)rTr__new__r5bytesrEs r;)test_uninitialized_LZMADecompressor_crashzHCompressorDecompressorTestCase.test_uninitialized_LZMADecompressor_crashs-)112BC#EG,c	3rKNrK))__name__
__module____qualname__r<rFrJrOrZr^r`rbrfrkrorsr~rrrrrrrrrrrrrrrrskip_if_pgo_taskrrrrr
refcount_testrrr"rKr;rrs&=P	H=
G7HFHHHHH
/
//@/,/*/ 3DG>===>>P
S3Yq)*
S3Yq)
)*
)8
NN3rKrcBeZdZdZdZdZdZdZdZdZ	dZ
d	Zy
)"CompressDecompressFunctionTestCasec|jttj|jttjg|jttjdd|jttjdd|jttjdd|jttjdd	|jt5tjdd
dtj
igddd|jttj|jttjg|jttjdd
|jttjdd|jt5tj
dtjiddd|jt5tj
dtjdddd|jt5tj
dt	ddd|jt5tj
dtjtddd|jt5tj
dtjtdddy#1swYxYw#1swY%xYw#1swYxYw#1swYxYw#1swYxYw#1swYyxYw)NrKxzrnonerblahrrMrrr r!rg1Ar#r'r&rr$)r*r+rr3r,r.r5r/r0r1r2rEs r;
test_bad_argsz0CompressDecompressFunctionTestCase.test_bad_argss{)T]]3)T]]B7)T]]CE)T]]CvF)T]]CG)T]]CF


z
*	NMM#a49J9J2K1LMM	N	
)T__5)T__b9)T__c&I)T__cEJ


y
)	EOOCOD	E

z
*	MOOC)OL	M

z
*	8OOCO7	8


z
*	OOOC
ON	O


z
*	JOO 1 1=

J	J	J#	N	N	E	E	M	M	8	8	O	O	J	JsH;*L'L#'L0!L<+M"+ML #L-0L9<MMMc|jt5tjtdddd|jt5tjttj
dddd|jt5tjttjddddy#1swYxYw#1swY^xYw#1swYyxYw)NrMr#r)r*rrr5rHr1rNr2rEs r;test_decompress_memlimitz;CompressDecompressFunctionTestCase.test_decompress_memlimits


y
)	:OOMDO9	:


y
)	IOO!$..4

I	I

y
)	OOO$T->->

O	O	O	:	:	I	I	O	Os#C+C+C#CC #C,ctjt}|j|ttjt
}|j|ttjttj}|j|ttjt
tj}|j|ttjttjt}|j|ttjttjt}|j|ttjttjt}|j|ttjttjt }|j|tyrd)rr5rHrTrUrNr1r2rer/r0rjrirnrmrrrqr7rs  r;test_decompress_good_inputz=CompressDecompressFunctionTestCase.test_decompress_good_inputsF
.& 01&
t~~>& 0$2C2CD& $//= J& $//= J& $//= J& $//= J&rKc|jttjtdd|jttjt
dd|jttjtddtjt|jttjtddtjt|jttjtddtjt|jttjtddtjty)Nr')r*rrr5rHrNrer/r0rjrirnrmrrrqrEs r; test_decompress_incomplete_inputzCCompressDecompressFunctionTestCase.test_decompress_incomplete_inputs)T__mDS6IJ)T__6Ft6LM)T__6Ft6L!%-		I)T__6Ft6L!%-		I)T__6Ft6L!%-		I)T__6Ft6L!%-		IrKc|jt5tjtddd|jt5tjt
ddd|jt5tjttjddd|jt5tjttjddd|jt5tjttjtdddy#1swYxYw#1swYxYw#1swYxYw#1swY{xYw#1swYyxYwNrr')r*rrr5COMPRESSED_BOGUSrerNr1rHr2r/r0rEs r;test_decompress_bad_inputz<CompressDecompressFunctionTestCase.test_decompress_bad_inputs


y
)	.OO,-	.


y
)	.OO,-	.


y
)	EOO,T^^OD	E


y
)	EOOM$2C2COD	E


y
)	3OOM$//$1

3	3	3	.	.	.	.	E	E	E	E	3	3s;E

E*E#*E//E;
EE #E,/E8;Fctjt}tj|}|j	|ttjttj
}tj|}|j	|ttjttj}tj|}|j	|ttjttjt}tj|tjt}|j	|tyrd)	rr3rUr5rTr1r2r/rq)r7rrs   r;test_roundtripz1CompressDecompressFunctionTestCase.test_roundtrips

e$&&

eT^^4&&

eT%6%67&&

eT__m
Lt
N&rKcvtjttz}|j	|t
dzy)Nr)rr5rHrNrTrUrs  r;test_decompress_multistreamz>CompressDecompressFunctionTestCase.test_decompress_multistreams*
0@ @A	*rKcptjttz}|j	|t
yrQrr5rHrrTrUrs  r;test_decompress_trailing_junkz@CompressDecompressFunctionTestCase.test_decompress_trailing_junks&
0@ @A&rKc|tjtdztz}|j	|t
dzy)Nrrrs  r;)test_decompress_multistream_trailing_junkzLCompressDecompressFunctionTestCase.test_decompress_multistream_trailing_junks/
 14D DE	*rKN)rrrrrrrrrrrrr"rKr;rrs2J:O':
I3'&+'+rKrc"eZdZ	ddZdZdZy)TempFilec ||_||_yrQ)filenamerX)r7rrXs   r;rzTempFile.__init__s 
	rKct|jd5}|j|jdddy#1swYyxYw)Nwb)openrwriterXr7fs  r;	__enter__zTempFile.__enter__s7
$--
&	!
GGDII			s	<Ac.t|jyrQ)rr)r7argss  r;__exit__zTempFile.__exit__st}}rKNr)rrrrrrr"rKr;rrsGrKrceZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1d0Z2d1Z3d2Z4d3Z5d4Z6d5Z7d6Z8d7Z9d8Z:d9Z;d:Z<d;Z=d<Z>d=Z?d>Z@y?)@FileTestCasec\ttt5}	dddttd5}	dddttd5}	dddttd5}	dddy#1swYdxYw#1swYRxYw#1swY@xYw#1swYyxYw)Nwxa)rrrHrs  r;	test_initzFileTestCase.test_inits
gm,
-		
gi
%		
gi
%		
gi
%			
								s.A>B
B3B">B
BB"B+ctjt}t|t5t|5}|j
|jtdddt|d5}|jtdddt|5}|j
|jtdzddddddy#1swYwxYw#1swYYxYw#1swY*xYw#1swYyxYw)Nrr)
pathlibPathr
rrHrrTreadrUr)r7rrs   r; test_init_with_PathLike_filenamez-FileTestCase.test_init_with_PathLike_filename&s<<'
h

.	6(#
2q  51
2(C(
A
(#
6q  5195
6	6	6
2
2


6
6	6	6sRC5%CC5/CC5(C)C5C	C5C&	"C5)C2	.C55C>c8ttt5tt5}	dddttd5}	dddttd5}	ddddddy#1swYFxYw#1swY8xYw#1swY*xYw#1swYyxYw)Nrr)rr
rHrrs  r;test_init_with_filenamez$FileTestCase.test_init_with_filename0s
fm
,	&!
Q
&#&
!
&#&
!
		





		sPBA,BA8BBB,A5	1B8B	=BB
		BBctt5ttd5	dddttd5	dddttd5	dddttd5	dddttd5	dddttd5	ddddddy#1swYxYw#1swYxYw#1swYxxYw#1swYjxYw#1swY\xYw#1swYNxYw#1swYyxYw)Nrrbrrrab)rr
rrEs r;test_init_modezFileTestCase.test_init_mode9s
f
	&#&

&$'

&#&

&$'

&#&

&$'

		











		sC>B6C>CC>CC>/C1C>	C&C>#C2%C>6B?	;C>C	C>C	C>C#	C>&C/	+C>2C;	7C>>DcP|jttdD]c}tttt|5	ddd|j	t
5tt|5	ddddddey#1swYDxYw#1swY xYw#1swYxYw)N)r
xb)
addCleanuprr
rr*FileExistsError)r7modes  r;test_init_with_x_modez"FileTestCase.test_init_with_x_modeHs'	D6N&$'

""?3
fd+

		



s/BB/B1BB
	BBB%	c|jt5tttdddd|jt5tttdddd|jt5tttdddd|jt5tttdddd|jt5tttdddd|jt5tttdddd|jt5tttdddd|jt5tttdddd|jt5tttd	ddd|jt5tttd
ddd|jt5tttddddy#1swY1xYw#1swYxYw#1swYxYw#1swYxYw#1swYxYw#1swY_xYw#1swY5xYw#1swYxYw#1swYxYw#1swYxYw#1swYyxYw)N)rr
rxtzx+rxwxrtzr+wtzw+rw)r*r,rrrHrEs r;test_init_bad_modezFileTestCase.test_init_bad_modeRs-


z
*	7W]+X6	7


z
*	1W]+R0	1


z
*	3W]+T2	3


z
*	3W]+T2	3


z
*	3W]+T2	3


z
*	3W]+T2	3


z
*	3W]+T2	3


z
*	3W]+T2	3


z
*	3W]+T2	3


z
*	3W]+T2	3


z
*	3W]+T2	3	3)	7	7	1	1	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3sI
I,I9;J2J)J  J-J:KK<KI),I69JJJ J*-J7:KKKK(c|jt5ttddddd|jt5ttdt
jddd|jt5ttdt
jdzddd|jt5tttt
jddd|jt5tttt
jddd|jt5tttt
jddd|jt5tttt
jddd|jt5tttt
jdddy#1swYxYw#1swYxYw#1swYxYw#1swYJxYw#1swYxYw#1swYxYw#1swYxYw#1swYyxYw)Nrsasdrr)r*r+rrrr
CHECK_UNKNOWNCHECK_ID_MAXr,rHr]CHECK_CRC32r\CHECK_SHA256rEs r;test_init_bad_checkz FileTestCase.test_init_bad_checkjs


y
)	3WY62	3

y
)	?WY4+=+=>	?


y
)	BWY4+<+<q+@A	B

z
*	DW]+4??C	D


z
*	EW]+43C3CD	E


z
*	EW]+43C3CD	E


z
*	FW]+43D3DE	F


z
*	GW]+43E3EF	G	G!	3	3	?	?	B	B	D	D	E	E	E	E	F	F	G	Gs_H
%H((H5)I)I)I#)I())I4H%(H25H?III%(I14I=c|jt5ttddddd|jt5ttddddd|jt5ttddddd|jt
5ttddddd|jt
5ttddddd|jt5ttddddd|jt5tttd	dddy#1swYGxYw#1swY xYw#1swYxYw#1swYxYw#1swYxYw#1swYxYw#1swYyxYw)
Nrg(\@rrvrirBr)r*r+rrr
OverflowErrorr,rHrEs r;test_init_bad_presetz!FileTestCase.test_init_bad_preset~sa


y
)	2WYD1	2


y
)	0WYB/	0


y
)	0WYB/	0


}
-	0WYB/	0


}
-	0WYB/	0


y
)	3WYE2	3

z
*	7W]+A6	7	7	2	2	0	0	0	0	0	0	0	0	3	3	7	7sSE2
E?>F2F&F$F0F<2E<?F	FF!$F-0F9<Gc|jt5ttddgddd|jt5ttdddigddd|jt5ttdddigddd|jt5ttdt
jdd	gddd|jt5ttdt
jdd	gddd|jt5ttdt
jdd	gdddy#1swYKxYw#1swY!xYw#1swYxYw#1swYxYw#1swYxYw#1swYyxYw)
Nrr>rr?rr r@rrA)	r*r+rrr,rr.rCrDrEs r;test_init_bad_filter_specz&FileTestCase.test_init_bad_filter_specs


y
)	;WYj\:	;


z
*	=WYwl^<	=


z
*	>WYtUm_=	>


z
*	DWY%)%6%6qAB
D	D

z
*	DWY%)%6%6qAB
D	D

z
*	BWY%)__Q?@
B	B	B	;	;	=	=	>	>	D	D	D	D	B	BsGE7FF9)F?)F))F57FFFF&)F25F>c|jt5ttdtj
dtdddy#1swYyxYw)Nr)rrr)r*r,rrrr/r0rEs r;!test_init_with_preset_and_filtersz.FileTestCase.test_init_with_preset_and_filterss>


z
*	6WYDOO}
6	6	6	6s+A

Actt5}t|}|j|j	|j
|j|j	|j
dddt
tt5tt}|j}|j|j|j
|jdddy#1swY}xYw#1swYyxYwrQ)
rrHrcloserRclosedrr
_fprV)r7srcrfps    r;
test_closezFileTestCase.test_closes
]
#	)s
A
GGISZZ(
GGISZZ(	)fm
,	 AB
GGIOOBII&
GGI			)	)		sA"C.AC:.C7:Dc"ttt}	|j|j|j|j|j|j
|j|jttd}	|j|j|j
|j|jy#|j
wxYw#|j
wxYwNr)rrrHrRr;rr:rVrs  r;test_closedzFileTestCase.test_closedsW]+,	QXX&
FFHQXX&
GGI!WY$	QXX&
GGI!
GGI
GGIsAC' C<'C9<Dcttt}	|jt|j
|j
|jt|j
ttt5tt}	|j|j|jj|j|jt|j
	ddd|jt|j
y#|j
wxYw#|j
wxYw#1swYTxYwrQ)rrrHr*rfilenor:r,rr
rTr<assertIsInstanceintrs  r;test_filenozFileTestCase.test_filenosW]+,	2AHH=
GGI*ahh/
fm
,	 A
  QUU\\^<%%ahhj#6	
		
*ahh/
GGI	
		s0 D%>EAD:+E%D7:EEEc\ttt}	|j|j	|j|j|j	|j
|jt|jttd}	|j|j	|j
|jt|jtt}d|_t|}	|j|j	|j
|jt|jy#|j
wxYw#|j
wxYw#|j
wxYw)Nrcy)NFr"r"rKr;<lambda>z,FileTestCase.test_seekable.<locals>.<lambda>srK)
rrrHrVseekablerr:r*r,rR)r7rr=s   r;
test_seekablezFileTestCase.test_seekablesW]+,	OOAJJL)
FFHOOAJJL)
GGI*ajj1WY$	QZZ\*
GGI*ajj1m$$SM	QZZ\*
GGI*ajj1#
GGI
GGI
GGIs$AE/-FF/FFF+cNttt}	|j|j	|j|j|j	|j
|jt|jttd}	|j|j	|j
|jt|jy#|j
wxYw#|j
wxYwrA)
rrrHrVreadablerr:r*r,rRrs  r;
test_readablezFileTestCase.test_readablesW]+,	OOAJJL)
FFHOOAJJL)
GGI*ajj1WY$	QZZ\*
GGI*ajj1
GGI
GGIAC=-D=DD$cNttt}	|j|j	|j|j|j	|j
|jt|jttd}	|j|j	|j
|jt|jy#|j
wxYw#|j
wxYwrA)
rrrHrRwritablerr:r*r,rVrs  r;
test_writablezFileTestCase.test_writablesW]+,	QZZ\*
FFHQZZ\*
GGI*ajj1WY$	OOAJJL)
GGI*ajj1
GGI
GGIrPcttt5}|j|j	t
|j|j	ddddttt5}|j|j	t
dddttttj5}|j|j	t
|j|j	ddddttttj5}|j|j	t
|j|j	ddddttttjt5}|j|j	t
|j|j	ddddttttjt5}|j|j	t
|j|j	ddddttttjt 5}|j|j	t
|j|j	ddddttt"tjt$5}|j|j	t
|j|j	ddddy#1swY"xYw#1swYxYw#1swYxYw#1swYxYw#1swYxYw#1swY@xYw#1swYxYw#1swYyxYw)NrKrr')rrrHrTrrUrNrr1r2rer/r0rjrirnrmrrrqrs  r;	test_readzFileTestCase.test_reads
gm,
-	,QVVXu-QVVXs+	,g./
0	.AQVVXu-	.
gm,T^^
D	,QVVXu-QVVXs+	,g./8I8I
J	,aQVVXu-QVVXs+	,g./!__mE	,HIQVVXu-QVVXs+	,g./!__mE	,HIQVVXu-QVVXs+	,g./!__mE	,HIQVVXu-QVVXs+	,g./!__mE	,HIQVVXu-QVVXs+	,	,/	,	,	.	.	,	,	,	,	,	,	,	,	,	,	,	,sfAM>>%NANAN%AN2<AN?6AO0AO>NNN"%N/2N<?O	OO!cttt5}|j|j	dddddttt
5}|j|j	dddddttttj5}|j|j	dddddttt
tj5}|j|j	dddddy#1swYxYw#1swYxYw#1swYtxYw#1swYyxYw)NrrKr)	rrrHrTrrNrr1r2rs  r;test_read_0zFileTestCase.test_read_03s
gm,
-	-QVVAY,	-
g./
0	-AQVVAY,	-
gm,T^^
D	-QVVAY,	-
g./8I8I
J	-aQVVAY,	-	-
	-	-	-	-	-	-	-	-s/"D*"D6-"E?"E*D36D?EEcRttt5}g}|jdx}r@|j	t|d|j
||jdx}r@|jdj|tdddy#1swYyxYwNrvrK)
rrrHrrryrzrTr{rU)r7rchunksresults    r;test_read_10zFileTestCase.test_read_10=s
gm,
-	6FFF2J&&&$$S["5

f%FF2J&&&
SXXf-u5	6	6	6sAB/%BB&c@tttdz5}|j|j	t
dzdddttttz5}|j|j	t
dzdddtttdztjt5}|j|j	t
dzdddy#1swYxYw#1swYvxYw#1swYyxYw)Nrrr')rrrHrTrrUrNrnrr/rmrs  r;test_read_multistreamz"FileTestCase.test_read_multistreamEs
gma/0
1	2QQVVXuqy1	2
gm.>>?
@	2AQVVXuqy1	2
g.23!__mE	2HIQVVXuqy1	2	2		2	2	2	2	2	2s#(C<+(D(D<DDDc:tj}ttt_	t	ttdz5}|j
|jtdzddd|t_y#1swYxYw#|t_wxYwNr)	_compressionBUFFER_SIZEryrHrrrTrrU)r7saved_buffer_sizers   r;)test_read_multistream_buffer_size_alignedz6FileTestCase.test_read_multistream_buffer_size_alignedNsz)44#&}#5 	9'-1"456
6!  5195
6(9L$
6
6(9L$s#B
(B-B
B
B


Bcttttz5}|j	|jtdddy#1swYyxYwrQrrrHrrTrrUrs  r;test_read_trailing_junkz$FileTestCase.test_read_trailing_junkYsB
gm.>>?
@	.AQVVXu-	.	.	.s%AActttdztz5}|j	|jtdzdddy#1swYyxYwrargrs  r;#test_read_multistream_trailing_junkz0FileTestCase.test_read_multistream_trailing_junk]sK
gma/2BBC
D	2QVVXuqy1	2	2	2s(AAc&ttt5tt5}|j	|jt|j	|jdddddddy#1swYxYw#1swYyxYwr)rr
rHrrTrrUrs  r;test_read_from_filez FileTestCase.test_read_from_fileasq
fm
,	0&!
0Q  51  3/
0	0	0
0
0	0	0s#BAA;*B;B	BBc	tjd}t	tt
5t
5}|j|jt|j|jdddddddy#t$r|jdYwxYw#1swY2xYw#1swYyxYw)Nascii%Temporary file name needs to be ASCIIrK)
r
encodeUnicodeEncodeErrorskipTestrrHrrTrrU)r7bytes_filenamers   r;'test_read_from_file_with_bytes_filenamez4FileTestCase.test_read_from_file_with_bytes_filenamegs	C#]]73Nfm
,	0.)
0Q  51  3/
0	0	0"	CMMAB	C
0
0	0	0s4B
B9AB-<B9
B*)B*-B6	2B99Cctttdd5}|jt|j
dddy#1swYyxYw)Nr)rrrHr*r6rrs  r;test_read_incompletez!FileTestCase.test_read_incompleteqsA
gmDS12
3	0qh/	0	0	0s!AAcZtdd}tt|5}|jt|j
dddtt|5}|j
|jttt|jt|j
ddddtdD]C}tt|d|5}|jt|j
ddddEy#1swYxYw#1swYgxYw#1swYhxYw)Nir)
rHrrr*r6rrTryrUrx)r7	truncatedrr}s    r;test_read_truncatedz FileTestCase.test_read_truncatedus"$3'	
gi(
)	0Qh/	0
gi(
)	3QQVVCJ/7h2	3r	7A')BQ-01
7Q!!(AFFA6
7
7	7
	0	0	3	3

7
7s$!D	AD"D!	DD!D*	cttt}|j|j	t
|jttd5}|j	t
|jdddttt5}|j	t|jtdddy#1swYTxYw#1swYyxYwrA)	rrrHr:r*r,rr+floatrs  r;test_read_bad_argszFileTestCase.test_read_bad_argssW]+,		*aff-
gi
%	2j!&&1	2
gm,
-	:i9	:	:	2	2	:	:s!C*CCC&cttt5}|jt|j
dddy#1swYyxYwrQ)rrrr*rrrs  r;test_read_bad_datazFileTestCase.test_read_bad_datas;
g./
0	1Ai0	1	1	1s!AAcXttt5}g}|jx}r$|j	||jx}r$|jdj
|t|j|jddddy#1swYyxYwrrrrHread1rzrTr{rUr7rblocksr[s    r;
test_read1zFileTestCase.test_read1s
gm,
-	-FGGI%&%

f%GGI%&%SXXf-u5QWWY,	-	-	-s8B AB  B)cttt5}|j|j	dddddy#1swYyxYw)NrrK)rrrHrTrrs  r;test_read1_0zFileTestCase.test_read1_0s>
gm,
-	.QWWQZ-	.	.	.s"AA
c\ttt5}g}|jdx}r%|j	||jdx}r%|jdj
|t|j|jddddy#1swYyxYwrYrrs    r;
test_read1_10zFileTestCase.test_read1_10s
gm,
-	-FGGBK'&'

f%GGBK'&'SXXf-u5QWWY,	-	-	-s:B"AB""B+cdtttdz5}g}|jx}r$|j	||jx}r$|jdj
|tdz|j|jddddy#1swYyxYw)NrrKrrs    r;test_read1_multistreamz#FileTestCase.test_read1_multistreams
gma/0
1	-QFGGI%&%

f%GGI%&%SXXf-uqy9QWWY,	-	-	-s8B&AB&&B/cttt}|j|j	t
|jttd5}|j	t
|jdddttt5}|j	t|jddddy#1swYLxYw#1swYyxYwrA)rrrHr:r*r,rr+rs  r;test_read1_bad_argsz FileTestCase.test_read1_bad_argssW]+,		*agg.
gi
%	3j!''2	3
gm,
-	8i$7	8	8	3	3	8	8s!C	"C	CCcttt5}|j}|j	t|d|j
tj||j|jtdddttt5}|jd}|j	t|d|j
tj||j|jtdddy#1swYxYw#1swYyxYw)Nrrv)rrrHpeek
assertGreaterryrVrU
startswithrTr)r7rr[s   r;	test_peekzFileTestCase.test_peeks
gm,
-	.VVXFs6{A.OOE,,V45QVVXu-		.
gm,
-	.VVBZFs6{A.OOE,,V45QVVXu-		.	.	.	.
	.	.sA4D+-A5D7+D47Ecttd5}|jt|jdddy#1swYyxYwrA)rrr*r,rrs  r;test_peek_bad_argszFileTestCase.test_peek_bad_argss9
gi
%	2j!&&1	2	2	2s	!?Actt5}|j}dddttt5}|jt
t|dddttt5}|jt
t|dddttttj5}|jt
t|dddttttj5}|jt
t|dddttttjt5}|jt
t|dddy#1swYxYw#1swYaxYw#1swY)xYw#1swYxYw#1swYxYw#1swYyxYwr)rrU	readlinesrrHassertListEquallistiterrNrr1r2rjr/rir7rliness   r;
test_iteratorzFileTestCase.test_iteratorsz
U^	"qKKME	"
gm,
-	7  d1g6	7
g./
0	7A  d1g6	7
gm,T^^
D	7  d1g6	7
g./8I8I
J	7a  d1g6	7
g./!__mE	7HI  d1g6	7	7	"	"	7	7	7	7	7	7	7	7	7	7sGF8%G%G%G0%G+
%G78GGGG(+G47Hctt5}|j}dddttt5}D]"}|j|j
|$	dddy#1swYSxYw#1swYyxYwrQ)rrUrrrHrTreadline)r7rrlines    r;
test_readlinezFileTestCase.test_readlinesy
U^	"qKKME	"
gm,
-	5
5  t4
5	5	5	"	"	5	5sA3(A?3A<?Bctt5}|j}dddttt5}|j|jdddy#1swYKxYw#1swYyxYwrQ)rrUrrrHrrs   r;test_readlineszFileTestCase.test_readlinessj
U^	"qKKME	"
gm,
-	7  6	7	7	"	"	7	7sA+!A7+A47Bc	tjdtdzd}|jt	|t
jtt|}|j|jdddtz}|j|jjj|dy)Ng>Ar7rrz)Excessive amount of data was decompressed)rr3rF
assertLessryrbrcrrrTrrr_bufferrawtell)r7bombdecomp
max_decomps    r;test_decompress_limitedz$FileTestCase.test_decompress_limiteds;}}USX-a}8D	<#;#;<'$-(Q/,,
V^^//446
7	9rKcRt5}t|d5}|jtdddtjt}|j
|j|dddt5}t|dtj5}|jtdddtjttj}|j
|j|dddt5}t|dtj5}|jtdddtjttj}|j
|j|dddt5}t|dtjt5}|jtdddtjttjt}|j
|j|dddy#1swYxYw#1swYxYw#1swYxYw#1swYhxYw#1swY0xYw#1swYxYw#1swYxYw#1swYyxYw)Nrrr')rrrrUrr3rTgetvaluer1r2r/ri)r7dstrexpecteds    r;
test_writezFileTestCase.test_writes
Y	7##s#
q
}}U+HS\\^X6		7
Y	7##s4>>:
a
}}U4>>}BHS\\^X6		7
Y	7##s4+<+<=

}}U43D3D}EHS\\^X6		7
Y	7##s4??"/1
45
}}U4??-:%<HS\\^X6
	7	7

	7	7

	7	7

	7	7

	7	7s
IIAII+I4AI+J4I8
AJ-"JJ%AJI		III(	#I++I58J	=JJJ	JJ&c	lt5}t|d5}tdttdD]}|jt||dz	dddtjt}|j|j|dddy#1swYKxYw#1swYyxYw)Nrrrv)
rrrxryrUrrr3rTr)r7rrstartrs     r;
test_write_10zFileTestCase.test_write_10s
Y	7##s#
3q"1c%j"53EGGE%b123
3}}U+HS\\^X6	7	7
3
3	7	7s#
B*;BAB*B'	#B**B3ctdd}tdd}tdd}djd|||fD}t5}t|d5}|j	|dddt|d5}|j	|dddt|d5}|j	|ddd|j|j
|dddy#1swY~xYw#1swYdxYw#1swYJxYw#1swYyxYw)NrMrKc3FK|]}tj|ywrQrr3.0r
s  r;	<genexpr>z1FileTestCase.test_write_append.<locals>.<genexpr>LDMM!,L!rr)rUr{rrrrTr)r7part1part2part3rrrs       r;test_write_appendzFileTestCase.test_write_appendsetd4 de88LueU6KLL
Y	7##s#
q
#s#
q
#s#
q
S\\^X6	7	7





	7	7sT
DC D4C)DC5,(DC&	"D)C2	.D5C>	:DD
c|	ttd5}|jtdddtjt}t
td5}|j|j|dddtty#1swYkxYw#1swY%xYw#ttwxYw)Nrr)
rr
rrUrr3rrTrr)r7rrs   r;test_write_to_filezFileTestCase.test_write_to_files	&#&
!
}}U+Hfd#
5q  84
5
6N



5
5
6Ns9B*B1B*!B:B*BB*B'#B**B;c	tjd}	t	d5}|jtdddtjt}ttd5}|j|j|dddtty#t$r|jdYwxYw#1swYxYw#1swYExYw#ttwxYw)Nrnrorr)
r
rprqrrrrrUrr3rrTrr)r7rsrrs    r;&test_write_to_file_with_bytes_filenamez3FileTestCase.test_write_to_file_with_bytes_filename$s	C#]]73N	.#.
!
}}U+Hfd#
5q  84
5
6N"	CMMAB	C


5
5
6NsJB$CC1C+!CC$CCC
	CCCC-ctdd}tdd}tdd}djd|||fD}	ttd5}|j	|dddttd5}|j	|dddttd5}|j	|dddttd5}|j
|j|dddtty#1swYxYw#1swYxYw#1swYjxYw#1swY=xYw#ttwxYw)NrMrrKc3FK|]}tj|ywrQrrs  r;rz9FileTestCase.test_write_append_to_file.<locals>.<genexpr>6rrrrr)	rUr{rr
rrrTrr)r7rrrrrs      r;test_write_append_to_filez&FileTestCase.test_write_append_to_file2setd4 de88LueU6KLL
	&#&
!
&#&
!
&#&
!
fd#
5q  84
5
6N






5
5
6NskD/C?D/2DD/D.D/!D#'D/?DD/DD/D D/#D,(D//EcDttd}|j|jt|j
dtttd5}|jt|j
ddddttd5}|jt|j
d|jt|j
d|jt|j
ddddy#1swYxYw#1swYyxYw)Nrr(rr)texti)rrr:r*r,rrHr+rs  r;test_write_bad_argsz FileTestCase.test_write_bad_argsCsWY$		*aggv6
gm,c
2	;aj!''6:	;
gi
%	7i$7i&9i#6	7	7	;	;	7	7s"D
A$D
DDctt5}|j}dddt5}t|d5}|j	dddt
j
t}|j|j|dddy#1swY|xYw#1swYWxYw#1swYyxYwrA)	rrUrr
writelinesrr3rTr)r7rrrrs     r;test_writelineszFileTestCase.test_writelinesNs
U^	"qKKME	"
Y	7##s#
$qU#
$}}U+HS\\^X6		7	7	"	"
$
$	7	7s/B
B4B(AB4B%(B1	-B44B=cttt5}|jd|j	|jtdddddy#1swYyxYw)Ni+rrrHseekrTrrUrs  r;test_seek_forwardzFileTestCase.test_seek_forwardWsM
gm,
-	4
FF3KQVVXuST{3	4	4	4s9AA$ctttdz5}|jt	t
dz|j
|jt
dddddy#1swYyxYw)Nr{)rrrHrryrUrTrrs  r; test_seek_forward_across_streamsz-FileTestCase.test_seek_forward_across_streams\s\
gma/0
1	4Q
FF3u:#$QVVXuST{3	4	4	4sA	A..A7cttt5}|jd|j	dd|j|jtdddddy#1swYyxYw)Nriri8rrrHrrrTrUrs  r;%test_seek_forward_relative_to_currentz2FileTestCase.test_seek_forward_relative_to_currentasZ
gm,
-	5
FF3K
FF4OQVVXuTU|4	5	5	5sAA--A6cttt5}|jdd|j	|jtdddddy#1swYyxYw)Nirrrs  r;!test_seek_forward_relative_to_endz.FileTestCase.test_seek_forward_relative_to_endgO
gm,
-	5
FF4OQVVXuTU|4	5	5	5:AA%cttt5}|jd|j	d|j|jtdddddy#1swYyxYw)Nirrs  r;test_seek_backwardzFileTestCase.test_seek_backwardlsX
gm,
-	4
FF4L
FF3KQVVXuST{3	4	4	4sA
A,,A5c$tttdz5}|jt	t
dz|j
d|j|jt
ddt
zdddy#1swYyxYw)NriMi)rrrHrryrUrrTrs  r;!test_seek_backward_across_streamsz.FileTestCase.test_seek_backward_across_streamsrsl
gma/0
1	<Q
FF3u:#$
FF3KQVVXuST{U':;	<	<	<sA!BBcttt5}|jdd|j	|jtdddddy#1swYyxYw)Nijrrrs  r;"test_seek_backward_relative_to_endz/FileTestCase.test_seek_backward_relative_to_endxrrc:ttt5}|jt	t
dz|j
|jt	t
|j
|jddddy#1swYyxYw)N)#rK)	rrrHrryrUrTrrrs  r;test_seek_past_endzFileTestCase.test_seek_past_end}sk
gm,
-	,
FF3u:$%QVVXs5z2QVVXs+	,	,	,sA/BBcttt5}|jd|j	|jd|j	|j
tdddy#1swYyxYw)Nir)rrrHrrTrrrUrs  r;test_seek_past_startz!FileTestCase.test_seek_past_starts]
gm,
-	.
FF3KQVVXq)QVVXu-	.	.	.sAA88Bcttt}|j|j	t
|jdttd5}|j	t
|jddddttt5}|j	t
|jdd|j	tt
f|jdd|j	t|jd|j	t|jddddy#1swYxYw#1swYyxYw)Nrrr	r"sderp)rrrHr:r*r,rr+rs  r;test_seek_bad_argszFileTestCase.test_seek_bad_argssW]+,		*affa0
gi
%	5j!&&!4	5
gm,
-	:j!&&!Q7y*5qvvq"Ei6i9	:	:	5	5	:	:s"D6 B
E6D?Ecttt5}d}	|j|j	||jd}|sn|t
|z
}C|j|j	t
tdddttd5}tdt
tdD]=}|j|j	||jt||dz?|j|j	t
tdddy#1swYxYw#1swYyxYw)Nrr)
rrrHrTrrryrUrxr)r7rposr[s    r;	test_tellzFileTestCase.test_tells
gm,
-	3C  3/s6{"
QVVXs5z2	3gi
%	3QE
C0
,  3/c#c'*+
,
QVVXs5z2		3	3	3	3	3	3sA4D:)BE:EEcttt}|j|j	t
|jyrQ)rrrHr:r*r,rrs  r;test_tell_bad_argszFileTestCase.test_tell_bad_argss.W]+,		*aff-rKct}|jtd}|jt	|d|j|jt}|jtd}|j|j|j|j|jd}|jt	|d|j|j|j||z|y)Nrrih3i]3rK)	rr5ISSUE_21872_DATrTryrVrSrRr)r7d1entired2out1out2s      r;test_issue21872zFileTestCase.test_issue21872s
2>Ve,


}}_}?( }}S!TB'f-rKc8tjdgd}t||jz}tt	d5}|j|j
|||j|j|dddy#1swYyxYw)NQ)rrrr^rr)arrayryitemsizerrrTrr)r7qLENGTHrs    r;test_issue44439zFileTestCase.test_issue44439suKK_-Q!**$
gi
%	/QWWQZ0QVVXv.	/	/	/s
ABBN)Arrrrrrrr!r)r/r3r5r8r?rBrGrLrOrSrUrWr\r_rerhrjrlrtrvrzr}rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr"rKr;r
r
s:6
30G(7"B"6
(""0 242"2",:-62	9.20007:1-.--8
.2
757	97077"	774
4
55
4<5
,.:3 .
.</rKr
cHeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
Zy)OpenTestCasectjttd5}|j	|jtdddt5}tj|d5}|jtdddtj|j}|j	|ttj|d5}|jtdddtj|j}|j	|tdzdddy#1swYxYw#1swYxYw#1swYfxYw#1swYyxYw)Nrrrr)
rrrrHrTrrUrr5r)r7rbio	file_datas    r;test_binary_modeszOpenTestCase.test_binary_modess
YYw}-t
4	.QVVXu-	.
Y	3#3%

7IY.3%

7IY	2	3	3	.	.



	3	3sI%EE&2EAE&E5AE&EE	E&E#	E&&E/cptjd}|jdtj}t
j
ttdd5}|j|j|dddt5}t
j
|dd5}|j|dddt
j|jjd}|j||t
j
|dd5}|j|dddt
j|jjd}|j||dzdddy#1swY
xYw#1swYxYw#1swYrxYw#1swYyxYw)Nrn
r&encodingr'atr)rUdecodereplaceoslineseprrrrHrTrrr5r)r7uncompresseduncompressed_rawrrrs      r;test_text_modeszOpenTestCase.test_text_modess[||G,'//bjjA
YYw}-tgY
F	5!QVVX|4	5
Y	>#3w7
&1%
&7>>wGIY(893w7
&1%
&7>>wGIY(81(<=	>	>	5	5
&
&
&
&	>	>sJ!FF,'F9A$F,F /AF,FF	F, F)	%F,,F5cltt5tjtd5}|j	t
dddttd5}tj
|j}|j|t
dddtjtd5}|j|jt
dddtjtd5}|j	t
dddtjtd5}|j|jt
dzddddddy#1swY.xYw#1swYxYw#1swYxYw#1swYxYw#1swYCxYw#1swYyxYw)Nrrrr)	rr
rrrrUr5rrT)r7rrs   r;
test_filenamezOpenTestCase.test_filenamesE
f
	664(
A
fd#
3q OOAFFH5	  E2
364(
2A  51
264(
A
64(
6A  5195
6	6	6


3
3
2
2


6
6	6	6sF*E-F*:E:"F*5%F"F*<F"F*4(FF*-E7	2F*:F	?F*F	F*F	F*F'	#F**F3cHtjt}t|5tj|d5}|j
tdddt|d5}tj|j}|j|tdddtj|d5}|j|jtddddddy#1swYxYw#1swYaxYw#1swY*xYw#1swYyxYw)Nrr)rrr
rrrrrUr5rrT)r7rrrs    r;test_with_pathlike_filenamez(OpenTestCase.test_with_pathlike_filenames<<'
h
	28T*
a
h%
3 OOAFFH5	  E2
38T*
2a  51
2
	2	2


3
3
2
2
	2	2sRDC4D&:D D>%D#D4C=	9DD		DD	DD!c|jt5tjtdddd|jt5tjtdddd|jt5tjtddddd|jt5tjtddddd|jt5tjtdd	dddy#1swYxYw#1swYxYw#1swYxYw#1swYhxYw#1swYyxYw)
Nrrbtrzutf-8rignore)errorsr
)newline)r*r,rrr
rEs r;test_bad_paramszOpenTestCase.test_bad_params	s


z
*	"IIfb!	"


z
*	%IIfe$	%


z
*	6IIfdWI5	6


z
*	5IIfd8I4	5


z
*	2IIfdDI1	2	2	"	"	%	%	6	6	5	5	2	2s;D D,D8E:E D),D58EE
Ec tjtd}tjt	t
dfi|5}|j
|jtdddt	5}tj|dfi|5}|jtdddtj|jfi|}|j
|tdddy#1swYxYw#1swYXxYw#1swYyxYw)Nr'rr)rr/r0rrrerTrrUrr5r)r7optionsrrrs     r;test_format_and_filtersz$OpenTestCase.test_format_and_filterss!__G
YYw/0$
B'
B	.aQVVXu-	.
Y	/#300
A
B'BIY.		/	/	.	.

	/	/s0%C,3DC8!AD,C58D	=DD
cltjd}|jdtj}t5}tj|dd5}|j|dddtj|jjd}|j|||jdtj|dd5}|j|j|ddddddy#1swYxYw#1swYxYw#1swYyxYw)Nrnr
r'z	utf-16-lerrr&)rUrrrrrrrrr5rrTrr)r7rrrrrs      r;
test_encodingzOpenTestCase.test_encoding!s||G,'//bjjA
Y	9#3{;
&q%
&7>>{KIY(89HHQK3{;
9q  <8
9
	9	9
&
&

9
9
	9	9s=D*D+A5D* !DD*D	D*D'	#D**D3cttjd5}tj|ddd5}|j	|jdddddddy#1swYxYw#1swYyxYw)Nsfoobarr&rnr)rrfoobar)rrr3rrTr)r7rrs   r;test_encoding_error_handlerz(OpenTestCase.test_encoding_error_handler.sp
T]]=1
2	5c3wxH
5A  84
5	5	5
5
5	5	5s"A7!A+A7+A4	0A77Bctjd}t5}tj	|ddd5}|j|ddd|j
dtj	|ddd5}|j|j|gddddddy#1swYfxYw#1swYxYw#1swYyxYw)Nrnr'r
)rrrr&
)	rUrrrrrrrTr)r7rrrs    r;test_newlinezOpenTestCase.test_newline4s||G$
Y	8#3wE


HHQK3wE
8  7
8		8	8


8
8		8	8s:C	B12C	>"B= C	1B:	6C	=C	C		Cc|jttdD]}ttd|vrdnd}tj	t||5	ddd|jt5tj	t|5	ddddddy#1swYNxYw#1swY xYw#1swYxYw)N)r
rr#trnr)rrr
rrr*r)r7r rs   r;test_x_modezOpenTestCase.test_x_mode>s'%	D6N"%+w4H64(;

""?3
YYvt,

	



s0B"2B:
B.B:"B+	.B73B::C	N)
rrrrrrrrr!r#r&r)r,r"rKr;rrs43
>6	22	/958	rKrc$eZdZdZdZdZdZy)MiscellaneousTestCasec|jtjtj|jtjtj|jtjtjdz|jtjtjyr)rVris_check_supportedr]r-rRr,r+rEs r;test_is_check_supportedz-MiscellaneousTestCase.test_is_check_supportedLs	
//@A//0@0@AB	
001B1BQ1FGH	
001C1CDErKc|jt5tjdddd|jt5tjddiddd|jt5tjtj
ddddd|jtj5tjtjdddddtjtjdd	d
dd}|j|d
y#1swY
xYw#1swYxYw#1swYxYw#1swYjxYw)Ns
not a dictr rx)r junkrr distrrr)r pblplc	dict_size])
r*r+r_encode_filter_propertiesr,r.rrCFILTER_LZMA1rT)r7propss  r;test__encode_filter_propertiesz4MiscellaneousTestCase.test__encode_filter_propertiesXs,


y
)	:**=9	:


z
*	:**D%=9	:


z
*	R**$2C2CR+PQ	R


t~~
.	:**$2C2C37,9
:	:
..''$0	
 45%	:	:	:	:	R	R	:	:s/D7	E>'E'E7EE
EE%c|jt5tjtjdt
iddd|jtj5tjtjddddtjtjd}|j|dtj|j|dd|j|dd|j|d	d
|j|ddy#1swYxYw#1swYxYw)
Nz	should bestoo longr<r r8rr9rr:rr;r7)
r*r+r_decode_filter_propertiesrDrrrCr>rT)r7
filterspecs  r;test__decode_filter_propertiesz4MiscellaneousTestCase.test__decode_filter_propertiesms


y
)	R**4??[%<PQ	R


t~~
.	K**4+<+<kJ	K33!!#79
D)4+<+<=D)1-D)1-D)1-K0':	R	R	K	Ks+D1(%D=1D:=Ectjtjd}tj|}tjtj|}|j	||y)Nr<)rrBr>r=rT)r7spec1	reencodedspec2s    r; test_filter_properties_roundtripz6MiscellaneousTestCase.test_filter_properties_roundtrip|sV..!!#792259	..t/@/@)L&rKN)rrrr1r@rDrIr"rKr;r.r.Js
F6*
;'rKr.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.
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=?(΂=I3R
isPX2jLbc-HoJliQk?@xH12Puw㾪iWЀ#cb5]dWlUGyF7v5h8W5:?rD5@7cԗitSkKvy6Te
]:kla4r}r*z8hӼl-KZL3Ϝ!^9w PPKdZ}%$/&,qh{Q)qÀo![Ԋwt`^??\RԎXaЫS>ɕH	
%$.oRbU^S/vr̢GkzʀЋIxy-0z^֏_Pi萄ܿky܁+\YYhw̴ |ejz`A叩	=_%voZO	M-<"CMg~b|'x!JFu87yu_@qc#5)_
3]o]5myK+b t0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