python (3.11.7)

(root)/
lib/
python3.11/
test/
__pycache__/
test_int.cpython-311.opt-1.pyc

e|vVddlZddlZddlZddlmZddlmZmZdddddd	d
ddd
eej	ej	fde
fdde
fde
fde
fde
fde
fgZGddeZ
GddejZGddejZGddeZedkrejdSdS)N)support)VALID_UNDERSCORE_LITERALSINVALID_UNDERSCORE_LITERALS)0r)1)9	)10
)99c)100d)314:)z 314r)z314 r)z  		  314  		  rz  1x)z  1  rz  1     		  uȀceZdZdS)IntSubclassN__name__
__module____qualname__A/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_int.pyrrsDrrceZdZdZdZdZdZejdZ	dZ
dZdZd	Z
d
ZdZdZd
ZdZdZdZdZdZdZdS)IntTestCasesc%|tdd|tdd|tdd|tdd|tdd|tdd|td	d|td
d|tdd|tdd|td
ddtD]_\}}dD]W}dD]R}||z|z}|}|dkr|tur|}	|t||C#t$rYOwxYwX`t	dt
jz
}t|}||dzt
j||t|t|ddt
jdztd}||ttd}||tdt
jz
}||dz	|dztd}||t|ttdd|tddd|tddd|ttdd|ttdd|ttdd |ttdd|ttd!d|ttd!d|td"dd#|td$dd#|td%d&d#|td'd(d#|td)d*d#|td+d,d#|td-d d#|td.d/d#|td0d1d#|td2d3d#|td4dd#|td5d6d#|td7d8d#|td9d:d#|td;dd#|td<d=d#|td>d?d#|td@dAd#|tdBdCd#|tdDdEd#|tdFdGd#|tdHdId#|tdJdKd#|tdLdMd#|tdNdOd#|tdPdQd#|tdRdSd#|tdTdUd#|tdVdWd#|tdXdYd#|tdZd[d#|td\d]d#|td^d_d#|td`dad#|tdbdcd#|tdddd|tdddd|tdedd|tddd|tddd|tdfdd&|tdgdd|tdhdd|tdidd&|t5tdjddddn#1swxYwY|tdkdl|tdkd1dl|tddd|tdd d|tdfdd&|tdmdd|tdnd d|tdodd&|ttdpd|ttdqd|ttdrd|ttdsd|ttdtd |ttdud |ttdvd |ttdwd |ttdxd|ttdyd|ttdzd|ttd{d|td|dd}|td~dd}|tdd&d}|tdd(d}|tdd*d}|tdd,d}|tdd d}|tdd/d}|tdd1d}|tdd3d}|tddd}|tdd6d}|tdd8d}|tdd:d}|tddd}|tdd=d}|tdd?d}|tddAd}|tddCd}|tddEd}|tddGd}|tddId}|tddKd}|tddMd}|tddOd}|tddQd}|tddSd}|tddUd}|tddWd}|tddYd}|tdd[d}|tdd]d}|tdd_d}|tddad}|tddcd}dS)NrgQ	@gQ	g333333@g333333g@gz-3z -3 u -3 r)r+-)rr	rr&rg}Ô%ITg}Ô%IX1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110o123rS0x123i#0x0o0b!100000000000000000000000000000000l1020020222012211112111000000000000000032244002423141
15501040155042113014223544000000000012068657454r

4294967296r
1904440554	9ba461594	535a79889
	2ca5b7464	1a20dcd81	100000000a7ffda91704he7g44f5aff663723ai4g281d55i41fj8b1841606k7icmb994aghek2mgldnchbnmb28jpdm8pfgih476beigg5qmcpqg4q0jto44000000 3aokq94!2qhxjli"2br45qb#1z141z4$z 0o123  0000b100z	 0O123   z 0X123  z 0B100 0100123{0X1230O1230B1000b20b020B20B020o80o080O80O080xg0x0g0Xg0X0g!100000000000000000000000000000001l1020020222012211112121000000000000000132244002423142
15501040155052113014223554000000000112068657455
4294967297
1904440555	9ba461595	535a7988a	2ca5b7465	1a20dcd82	100000001a7ffda92704he7g54f5aff673723ai4h281d55i51fj8b1851606k7idmb994ahhek2mgmdnchbnnb28jpdn8pfgih576beigh5qmcpqh4q0jto540000013aokq952qhxjlj2br45qc1z141z5)
assertEqualintL
ValueErrorreprsysmaxsizeassertIsInstanceassertRaises	TypeError)selfsvsignprefixssvvxs        r
test_basiczIntTestCases.test_basic#sS3'''TA&&&UR(((S1%%%TB'''S1%%%TB'''TB'''Vb)))9::B???T"r***
	
	DAq$	
	
7F$*BBs{{q
':':R((R"5555%	

CK  FF1s{l+++a%%%QqrrUS[]333
JJa%%%KKa%%%
s{NaA&&&	NNa%%%	
)S!R000Wa"---Wb))3///	
*c4444*c4333*c4333*c4333*c4333*c4333	
@!DDjQQQ4a88*EEE0!44jAAA-q11:>>>_a00*===^Q//<<<]A..
;;;]A..
;;;\2..
;;;\2..
;;;["--z:::["--z:::["--z:::["--z:::["--z:::Z,,j999Z,,j999Z,,j999Z,,j999Z,,j999Z,,j999Z,,j999Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888	
Z++R000Z++R000UA***Wa"---Wa#...Wa!,,,[!,,b111Z++S111Y**A...


z
*
*		qMMM																
Vc***VR#...	
Wb))3///Wa"---Wa!,,,Wb))3///Wa"---Wa!,,,	
*c5!444*c61555*c5!444*c61555*c5!444*c61555*c5!444*c61555*c5"555*c62666*c5"555*c62666	
@!DDjQQQ4a88*EEE0!44jAAA-q11:>>>_a00*===^Q//<<<]A..
;;;]A..
;;;\2..
;;;\2..
;;;["--z:::["--z:::["--z:::["--z:::["--z:::Z,,j999Z,,j999Z,,j999Z,,j999Z,,j999Z,,j999Z,,j999Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z888Y++Z88888s$4#G
G%	$G%	5kkkc|t5tddddn#1swxYwY|t5tddddn#1swxYwY|t5tddddn#1swxYwY|t5tddddn#1swxYwY|t5tdddddS#1swxYwYdS)Nr%r&z- 1z+ 1z + 1 rrrrs rtest_invalid_signszIntTestCases.test_invalid_signssU


z
*
*		HHH															


z
*
*		HHH															


z
*
*		JJJ															


z
*
*		JJJ															


z
*
*		LLL																		sT7;;A88A<?A<B99B=B=C::C>C>D<<EEc"|tdd|tdd|tddd|tddddS)Nu(१२३४५६७८९०1234567890l
>V3&Z
u١٢٣٤٥٦٧٨٩٠iIrrrrs rtest_unicodezIntTestCases.test_unicodesGHHJ^___344jAAAGKKMabbb3Q77DDDDDrc
tD]tfddDr|tdt	|tdtdddtD]@tfddDr|ttdA|tddd	|td
d|tdd|ttd
|ttd|ttd|ttddS)Nc3 K|]}|vV	dSNr.0chlits  r	<genexpr>z0IntTestCases.test_underscores.<locals>.<genexpr>'//29//////rz.eEjJr_rc3 K|]}|vV	dSrrrs  rrz0IntTestCases.test_underscores.<locals>.<genexpr>rr1_00r"r
0_100rs1_00_100z+_1001__00100_)	ranyrrevalreplacerrr)rrs @rtest_underscoreszIntTestCases.test_underscoress,	H	HC////w/////
Sa[[$s))444Sa[[#ckk#r.B.BA*F*FGGGG.	7	7C////w/////
j#sA6666VQ+++Ws+++Ws+++*c6222*c7333*c7333*c622222rc|tdd|tdd|tdd|tdddS)Nrrz-1r(s10s-1)assertIsrrs rtest_small_intszIntTestCases.test_small_intssr	


c$ii$$$

c$ii$$$

c%jj"%%%

c%jj"%%%%%rcJ|tddS)Nrrrs rtest_no_argszIntTestCases.test_no_args	s""""""rc|tddd|td5tddddn#1swxYwY|td5tdddddn#1swxYwY|ttd	|ttd
dS)Nrr)baser6zkeyword argumentg333333?)r)rrrr)rrassertRaisesRegexrrrs rtest_keyword_argszIntTestCases.test_keyword_argssYU+++Q///

#
#I/A
B
B		#JJJJ															

#
#I/A
B
B	!	!%a    	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!)Sr222)Sq11111s$AA"%A"B""B&)B&ch|tddd|t5tdddddn#1swxYwY|t5tdddddn#1swxYwY|t5tdddddn#1swxYwY|t5tdddd	zz

dddn#1swxYwY|t5tddd	z
dddn#1swxYwYt	ddD]'}|td|
d(dS)z9Testing the supported limits of the int() base parameter.rr8rrN%isr)r)rrrrrangerrs  rtest_int_base_limitsz!IntTestCases.test_int_base_limitssS!a(((


z
*
*		QKKK															


z
*
*		RLLL															


z
*
*		TNNN															


z
*
*	&	&!QV*%%%%	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&


z
*
*	"	"!S&!!!!	"	"	"	"	"	"	"	"	"	"	"	"	"	"	"!BKK	5	5DS4000!4444	5	5sYAA #A BB"%B"C  C$'C$D))D-0D-E//E36E3c|t5tdddddn#1swxYwY|t5tddddddS#1swxYwYdS)z2Not integer types are not valid bases; issue16772.rg@Ng@)rrrrs rtest_int_base_bad_typesz$IntTestCases.test_int_base_bad_types's


y
)
)		SMMM															


y
)
)		SMMM																		s8<<A;;A?A?cGddt}ddzddzddfD]D}|t5td|dddn#1swxYwYE|td|d	d
|td|d	d|td|d
	ddS)NceZdZdZdZdS)9IntTestCases.test_int_base_indexable.<locals>.MyIndexablec||_dSrvalue)rrs  r__init__zBIntTestCases.test_int_base_indexable.<locals>.MyIndexable.__init__0s
"


rc|jSrrrs r	__index__zCIntTestCases.test_int_base_indexable.<locals>.MyIndexable.__index__2s
z!rN)rrrrrrrrMyIndexabler/s2
#
#
#
"
"
"
"
"rrr)rrr43101rr8rerqi)objectrrrr)rrrs   rtest_int_base_indexablez$IntTestCases.test_int_base_indexable.sP	"	"	"	"	"&	"	"	"sFQVGQ*	 	 D"":..
 
 D$
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 	
UQ888!<<<UR9993???UR9999EEEEEsAA	!A	cGddtGddt}Gddt}ttfd||tg}	dd	lm|fd
n#t$rYnwxYw|D]B}|d}|t|5|	t|dt|tttfr%|	t|d
dnEd}|t|5t|d
dddn#1swxYwY|td5t|ddddn#1swxYwYdddn#1swxYwYDdS)NceZdZdS)<IntTestCases.test_non_numeric_input_types.<locals>.CustomStrNrrrr	CustomStrrBrrceZdZdS)>IntTestCases.test_non_numeric_input_types.<locals>.CustomBytesNrrrrCustomBytesrCrrrceZdZdS)BIntTestCases.test_non_numeric_input_types.<locals>.CustomByteArrayNrrrrCustomByteArrayrDrrrc>|Sr)decode)brs r<lambda>z;IntTestCases.test_non_numeric_input_types.<locals>.<lambda>Isii

++rr)arraycd|S)NBr)rrs rrz;IntTestCases.test_non_numeric_input_types.<locals>.<lambda>SsuuS!}}rs100rr)r6zcan't convert non-stringzinvalid literalsAAAAAAAAAAAAAAAA)strbytes	bytearray
memoryviewrappendImportErrorsubTesttyperr
isinstancerrr)	rrr	factoriesfrmsgrrs	       @@rtest_non_numeric_input_typesz)IntTestCases.test_non_numeric_input_types?s	#"""""""&&&&&%&&&.....i...
++++

		6######
44445555			D	
	(	(A&		Ad1gg&&	
(	
(  Q---a#ui!899"$$SAYY22224C//	3??""Aq			"""""""""""""""++J8IJJ((+'''(((((((((((((((	
(	
(	
(	
(	
(	
(	
(	
(	
(	
(	
(	
(	
(	
(	
(	(	(smA66
BB8BF?EF?E!!F?$E!%F?F(F?(F,,F?/F,0F??G	G	c6|ttdddd|ttdddd|ttdddd|ttdddd|ttdddddS)	Ns123rr"rW123s123 s123As1234)rrr
rs rtest_int_memoryviewz IntTestCases.test_int_memoryviewbsZ//!455r:::Z
33AaC8992>>>Z001566;;;Z001566;;;Z001566;;;;;rcH|ttddS)Nz1.2rrs rtest_string_floatzIntTestCases.test_string_floatis *c511111rc	Gdd}|tt|Gddt}|tt|Gdd}|t|dGdd	}t|fD]}Gd
d|}|t|dGdd
|}|t5|t|ddddn#1swxYwYGdd|}|t5|t5t|dddn#1swxYwYdddn#1swxYwYt|fD]Q}	Gdd|	Gfdd|}
|t5|t|
ddddn#1swxYwYGdd|	Gfdd|}|t5|t|
ddddn#1swxYwYGfdd|	Gfdd|}	|t5t|dddn#1swxYwY|d||	fn:#t$r-}
|t|
dYd}
~
nd}
~
wwxYwGdd|	Gfd d!|}|t5|t5t|dddn#1swxYwYdddn#1swxYwYSdS)"NceZdZdS)>IntTestCases.test_intconversion.<locals>.ClassicMissingMethodsNrrrrClassicMissingMethodsrnDrrceZdZdS)7IntTestCases.test_intconversion.<locals>.MissingMethodsNrrrrMissingMethodsr"rr rr#ceZdZdZdS)-IntTestCases.test_intconversion.<locals>.Foo0cdSN*rrs r__int__z5IntTestCases.test_intconversion.<locals>.Foo0.__int__wrrNrrrr)rrrFoo0r%v#




rr,r(ceZdZdS)0IntTestCases.test_intconversion.<locals>.ClassicNrrrrClassicr/|r rr0ceZdZdZdZdS):IntTestCases.test_intconversion.<locals>.IntOverridesTrunccdSr'rrs rr)zBIntTestCases.test_intconversion.<locals>.IntOverridesTrunc.__int__2rcdS)Nirrs r	__trunc__zDIntTestCases.test_intconversion.<locals>.IntOverridesTrunc.__trunc__s3rN)rrrr)r6rrrIntOverridesTruncr2s2rr7ceZdZdZdS)2IntTestCases.test_intconversion.<locals>.JustTrunccdSr'rrs rr6z<IntTestCases.test_intconversion.<locals>.JustTrunc.__trunc__r4rNrrrr6rrr	JustTruncr9s#rr<ceZdZdZdS)9IntTestCases.test_intconversion.<locals>.ExceptionalTrunccddzdS)Nrrrrs rr6zCIntTestCases.test_intconversion.<locals>.ExceptionalTrunc.__trunc__sEEEErNr;rrrExceptionalTruncr>s#rr@ceZdZdZdS).IntTestCases.test_intconversion.<locals>.IndexcdSr'rrs rrz8IntTestCases.test_intconversion.<locals>.Index.__index__!rrNrrrrrrrIndexrB#"""""rrFceZdZfdZdS);IntTestCases.test_intconversion.<locals>.TruncReturnsNonIntcSrr)rrFs rr6zEIntTestCases.test_intconversion.<locals>.TruncReturnsNonInt.__trunc__s$uwwrNr;)rFsrTruncReturnsNonIntrIs.'''''''rrKceZdZdZdS)0IntTestCases.test_intconversion.<locals>.IntablecdSr'rrs rr)z8IntTestCases.test_intconversion.<locals>.Intable.__int__rDrNr+rrrIntablerMrGrrOceZdZfdZdS)=IntTestCases.test_intconversion.<locals>.TruncReturnsNonIndexcSrr)rrOs rr6zGIntTestCases.test_intconversion.<locals>.TruncReturnsNonIndex.__trunc__s&wyy(rNr;)rOsrTruncReturnsNonIndexrQs.)))))))rrSceZdZfdZdS)4IntTestCases.test_intconversion.<locals>.NonIntegralcSrrrNonIntegrals rr6z>IntTestCases.test_intconversion.<locals>.NonIntegral.__trunc__s*{}},rNr;rXsrrXrUs.-------rrXceZdZfdZdS)@IntTestCases.test_intconversion.<locals>.TruncReturnsNonIntegralcSrrrWs rr6zJIntTestCases.test_intconversion.<locals>.TruncReturnsNonIntegral.__trunc__s*{}},rNr;rYsrTruncReturnsNonIntegralr[s.-------rr]zFailed to raise TypeError with z2__trunc__ returned non-Integral (type NonIntegral)ceZdZdZdS)/IntTestCases.test_intconversion.<locals>.BadIntcdSNgE@rrs rr)z7IntTestCases.test_intconversion.<locals>.BadInt.__int__s#trNr+rrrBadIntr_s#$$$$$rrbceZdZfdZdS);IntTestCases.test_intconversion.<locals>.TruncReturnsBadIntcSrrrrbs rr6zEIntTestCases.test_intconversion.<locals>.TruncReturnsBadInt.__trunc__s%vxxrNr;rbsrTruncReturnsBadIntrds.(((((((rrh)
rrrrrassertWarnsDeprecationWarningZeroDivisionErrorfailr
)rrr#r,r0rr7r<r@trunc_result_baserKrSr]erhrbrFrOrXs               @@@@rtest_intconversionzIntTestCases.test_intconversionlsG								)S*?*?*A*ABBB					V			)S..*:*:;;;									
TTVVb)))								W%H	.H	.D




D




S!2!2!4!455r:::




D


!!"455
7
7  YY[[!1!12666
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7




4


""#455
(
(!!"455
(
($$&&'''
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
('-g%63
.3
.!"""""-"""''''''''''%%&899DD$$S););)=)=%>%>CCCDDDDDDDDDDDDDDD"""""/""")))))))4)))%%&899DD$$S););)=)=%>%>CCCDDDDDDDDDDDDDDD-------"3---
-------d---	<))*<==773355666777777777777777III $&788;<<<<!===$$SVV'<=========$$$$$.$$$((((((((((&&y11..%%&899..**,,---..............................c3
.+H	.H	.s),E!!E%	(E%	G*/GG*GG*GG**G.	1G.	9,I11I58I54,K,,K03K0M<2M
M<MM<MM<<
N3#N..N3.Q	P-	!Q-P1
1Q4P1
5QQQc0Gddt}Gddt}|d}||d|t|d|t|ddS)NceZdZdZdS):IntTestCases.test_int_subclass_with_index.<locals>.MyIndexcdSr'rrs rrzDIntTestCases.test_int_subclass_with_index.<locals>.MyIndex.__index__r*rNrErrrMyIndexrrr-rrtceZdZdZdS);IntTestCases.test_int_subclass_with_index.<locals>.BadIndexcdSrarrs rrzEIntTestCases.test_int_subclass_with_index.<locals>.BadIndex.__index__trNrErrrBadIndexrv#




rryr<r)rr)rrtrymy_ints    rtest_int_subclass_with_indexz)IntTestCases.test_int_subclass_with_indexs					c								s			###Va(((XXZZ!,,,,,rc^Gddt}Gddt}|d}||d|t|d|d}||d|tt|dS)NceZdZdZdS)6IntTestCases.test_int_subclass_with_int.<locals>.MyIntcdSr'rrs rr)z>IntTestCases.test_int_subclass_with_int.<locals>.MyInt.__int__r*rNr+rrrMyIntrr-rrceZdZdZdS)7IntTestCases.test_int_subclass_with_int.<locals>.BadIntcdSrarrs rr)z?IntTestCases.test_int_subclass_with_int.<locals>.BadInt.__int__rxrNr+rrrrbrrzrrbr<r()rrrr)rrrbr{s    rtest_int_subclass_with_intz'IntTestCases.test_int_subclass_with_ints					C								S			q###Vb)))###)S&11111rc	
Gdd	Gddt}Gdd
Gddt}G	fd	d
}G
fdd}Gd
d}	}|t5t|}dddn#1swxYwY||d|t|t|}t|}||d|t|t
}|t5t|}dddn#1swxYwY||d|t|t|}|t5t|}dddn#1swxYwY||d|t|t|}|t5t|}dddn#1swxYwY||d|t|t|}|t5|tt|dddn#1swxYwY|}|t5t|}dddn#1swxYwY||d|t|t|t5t|}dddn#1swxYwY||d|t|tdS)NceZdZdZdS)<IntTestCases.test_int_returns_int_subclass.<locals>.BadIndexcdSNTrrs rrzFIntTestCases.test_int_returns_int_subclass.<locals>.BadIndex.__index__rxrNrErrrryrrzrryceZdZdZdS)=IntTestCases.test_int_returns_int_subclass.<locals>.BadIndex2cdSrrrs rrzGIntTestCases.test_int_returns_int_subclass.<locals>.BadIndex2.__index__rxrNrErrr	BadIndex2rrzrrceZdZdZdS):IntTestCases.test_int_returns_int_subclass.<locals>.BadIntcdSrrrs rr)zBIntTestCases.test_int_returns_int_subclass.<locals>.BadInt.__int__rxrNr+rrrrbrrzrrbceZdZdZdS);IntTestCases.test_int_returns_int_subclass.<locals>.BadInt2cdSrrrs rr)zCIntTestCases.test_int_returns_int_subclass.<locals>.BadInt2.__int__rxrNr+rrrBadInt2rrzrrceZdZfdZdS)HIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsBadIndexcSrr)rrys rr6zRIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsBadIndex.__trunc__sxzz!rNr;)rysrTruncReturnsBadIndexrs.
"
"
"
"
"
"
"rrceZdZfdZdS)FIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsBadIntcSrrrfs rr6zPIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsBadInt.__trunc__svxxrNr;rgsrrhrs.
 
 
 
 
 
 
 rrhceZdZdZdS)KIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsIntSubclasscdSrrrs rr6zUIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsIntSubclass.__trunc__rxrNr;rrrTruncReturnsIntSubclassrrzrrrr)	rrirjrrrrrr)rrrrrhrbad_intngood_intryrbs         @@rtest_int_returns_int_subclassz*IntTestCases.test_int_returns_int_subclasss1																													c				"	"	"	"	"	"	"	"	"	"	 	 	 	 	 	 	 	 	 	 								(**


0
1
1		GA															A

d1ggs###)++LLA

d1ggs###&((


0
1
1		GA															A

d1ggs###'))


0
1
1		GA															A

d1ggs###&&((


0
1
1		GA															A

d1ggs###$$&&


0
1
1	7	7ig666	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7+*,,


0
1
1		H

A															A

d1ggs###


0
1
1	&	&H%%A	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&A

d1gg{+++++s~B..B25B22FFF;HHHJ  J$'J$
"L;;L?L?*NN

N
)PP	P	cndfd	}|d|d|d|d|dd|dd|dd	|d
d|d
d	|d|dd|d|dd|d
|d
ddS)Nc td|d|d5}|t|nt||dddn#1swxYwY|jjdd|dn||fzdS)Nzint(z, ))rrz*invalid literal for int() with base %d: %rr)rrrr	exceptionargs)rrcmrs   rcheckz.IntTestCases.test_error_message.<locals>.check1s""::89444'@#BB
!EG<FFFF4LLL
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
R\.q1<|q12
3
3
3
3
3s#AAA½u123½z  123 456  z123rz123 245rQr$z123245rs123u123rr)rrs` rtest_error_messagezIntTestCases.test_error_message0s&		3		3		3		3		3		3	f



i
m
i
i
mR   
mR   
lB
lB
j
j"
j
j"
k
k2rc&|tddd|tddd|tddd	|td
dddS)
N=1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1r)iUUUU1_2_3_4_5_6_7_0_1_2_3r1iSpS1_2_3_4_5_6_7_8_9r$lgF
1_2_3_4_5_6_7rii2Drrs rtest_issue31619zIntTestCases.test_issue31619Qs\^_``:	<	<	<4a88-HHH0"55{CCC_b11:>>>>>rN)rrrrrrrrcpython_onlyrrrrrrrrrror|rrrrrrrr r !sUw9w9w9r


EEE333&
&&&###222555"FFF"!(!(!(F<<<222Z.Z.Z.x
-
-
-222"F,F,F,PB?????rr cpeZdZeZfdZfdZdZdZddZ	dZ
dZd	Zd
Z
dZdZd
ZdZxZS)IntStrDigitLimitsTestscttj|_tjddS)Ni)supersetUprget_int_max_str_digits_previous_limitset_int_max_str_digitsr	__class__s rrzIntStrDigitLimitsTests.setUp]s<


"9;;"4(((((rcztj|jtdSr)rrrrtearDownrs rrzIntStrDigitLimitsTests.tearDownbs3"4#7888
rc|tjd|tjdt	jd5|tjd|ddz}t|dddn#1swxYwY|tjddS)Nri Nr)	
assertGreaterrr
assertLessradjust_int_max_str_digitsr	int_classr
)ris  rtest_disabled_limitz*IntStrDigitLimitsTests.test_disabled_limitfs
3577;;;244f===

.q
1
1		S7991===sV|,,AFFF																
3577;;;;;s#AB>>CCc	J|j}tj}|d|z|dd|zz|d|zdz|dd|zz|dd|zz|t	td|dz
z|dS)z&Ignore the +/- sign and space padding.rrr%r&rrN)rrrrlenr
)rr	maxdigitss   rtest_max_str_digits_edge_casesz5IntStrDigitLimitsTests.test_max_str_digits_edge_casesosN	.00		#	/"""	#i'(((	#	/C'(((	#i'(((	#i'(((S	A
!67788)DDDDDrNc|t5|||n|||ddddS#1swxYwYdSr)rrr)rrrs   rrzIntStrDigitLimitsTests.check{s


z
*
*	(	(|q!!!!q$'''		(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(s/AAActj}|d|dzz|dd|dzzz|d|dzzdz|dd|dzzz|dd|dzzz|d|dzzd|z}|t5t|ddddS#1swxYwYdS)Nrrrr%r&r)rrrrrr
)rrrs   rtest_max_str_digitsz*IntStrDigitLimitsTests.test_max_str_digitssR.00	

3)a-()))

3	A
..///

3)a-(3.///

3	A
..///

3	A
..///

3)a-())))O


z
*
*		FFF																		s!C>>DDctj}tj}|dkrtj}tdddzd}d}t
j|5|}t|}dddn#1swxYwY||z
}|	t|||d	krtjd
|dt
jtd|z5|
t5}|}t|dddn#1swxYwY||z
}	dddn#1swxYwY|d
t|j||	|dztdddzd}
|
t5}|}t|
dddn#1swxYwY||z
}|d
t|j|||dzdS)?Regression test: ensure we fail before performing O(N**2) work.rr/cir$ri1N?"slow" conversion took only 	 seconds.gףp=
?
conversionr)i )rrtimeprocess_time	monotonicrrrr
rrunittestSkipTestrrassertInrassertLessEqualr)rrget_timehuge_intdigitsstarthuge_decimalseconds_to_converterrseconds_to_fail_hugeextra_huge_intseconds_to_fail_extra_huges            r+test_denial_of_service_prevented_int_to_strzBIntStrDigitLimitsTests.test_denial_of_service_prevented_int_to_strsq.00	$8::??~H(CJ((r222

.v
6
6	)	)HJJEx==L	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)&XZZ%/\**F333$$#%E'9%E%E%EFF
F

.s4&=/A/A
B
B	6	6"":..
# 

H

















$,8::#5 		6	6	6	6	6	6	6	6	6	6	6	6	6	6	6
	


lC
$6$677713Ea3GHHH/#g+//b999


z
*
*	 cHJJE	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 &.XZZ%%7"

lC
$6$677724Fq4HIIIIIsZ'B

BB
E/%E?E/E	E/E	E//E36E3,HHHc2tj}tj}|dkrtj}d}d|z}tj|5|}t|dddn#1swxYwY||z
}|dkrtj	d|dtj|dz
5|
t5}|}t|dddn#1swxYwY||z
}dddn#1swxYwY|d	t|j|||d
zddz}	|
t5}|}t|	dddn#1swxYwY||z
}
|d	t|j||
|d
zdS)
rriD
8Nrrrrrr)7iO)rrrrrrrrrrrrrr
rr)rrrrhugerrrr
extra_hugers           r+test_denial_of_service_prevented_str_to_intzBIntStrDigitLimitsTests.test_denial_of_service_prevented_str_to_ints.00	$8::??~H6z

.v
6
6		HJJEIII															&XZZ%/$$#%E'9%E%E%EFF
F
.vz
:
:	6	6"":..
# 

D			














$,8::#5 		6	6	6	6	6	6	6	6	6	6	6	6	6	6	6
	


lC
$6$677713Ea3GHHH]



z
*
*	cHJJE
OOO															&.XZZ%%7"

lC
$6$677779KA9MNNNNNsZA;;A?A?D-#D	=D-	D
	
D-D
	D--D14D1F>>GGctj}dD]e}||5|d|dzz||ddz|dddn#1swxYwYfdS)z-The limit does not apply to power of 2 bases.)r)r6r1r$rirrriN)rrrr)rrrs   r!test_power_of_two_bases_unlimitedz8IntStrDigitLimitsTests.test_power_of_two_bases_unlimiteds.00	%	4	4D4((
4
4si!m4d;;;sW}d333
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	4s6A00A4	7A4	ctj}|dz}d|z}d|z}||||||d||ddS)Nr"1111_11_111)rrrr)rrtriplesrs_s     rtest_underscores_ignoredz/IntStrDigitLimitsTests.test_underscores_ignoreds.00	q.GO
g
qr

a999

b;;;rc|j}tj}d|z}||}|d|}|d|}t|t|dS)N5r%r&)rrrr
)rr
max_digitsrrpos_ineg_is       rtest_sign_not_countedz,IntStrDigitLimitsTests.test_sign_not_countedsrN	/11
*IaLL	'a''""	'a''""E


E




rc|j}tj}d|z}|||}|dkrB|t5t|dddn#1swxYwYn|dkrt||t5}||d|ddddS#1swxYwYdS)N2rr)rrrrrr
)rrrrrrrs       r_other_base_helperz)IntStrDigitLimitsTests._other_base_helpersQN	/11
*Ia"99"":..

A















BYYFFF


z
*
*	%cIgggt$$$	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%s$A((A,/A,#CCCcd}||5||dddn#1swxYwYd}||5||ddddS#1swxYwYdS)Nr"rrq)rrrs  rtest_int_from_other_basesz0IntStrDigitLimitsTests.test_int_from_other_basess
\\t\
$
$	*	*##D)))	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
\\t\
$
$	*	*##D)))	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*s;??BBBr)rrrrrrrrrrrrrrrrrr
__classcell__)rs@rrrYsI)))))
<<<
E
E
E(((()J)J)JV&O&O&OP444	 	 	 


%%%*******rrceZdZeZdS)IntSubclassStrDigitLimitsTestsN)rrrrrrrrrrsIIIrr__main__)rrrtestrtest.test_grammarrrrrrrrrTestCaser rrrmainrrr<module>r
s



<<<<<<<<	$	
ck		CK(		Z 	Z	j	Z 	:%*					#			u?u?u?u?u?8$u?u?u?p~*~*~*~*~*X.~*~*~*B%;zHMOOOOOr