Your IP : 216.73.216.196


Current Path : /opt/alt/python37/lib64/python3.7/test/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/test/__pycache__/test_int.cpython-37.pyc

B

� f�k�@s�ddlZddlZddlZddlmZddlmZmZdddddd	d
ddd
eej	�ej	fde
fdde
fde
fde
fde
fde
fgZGdd�de�Z
Gdd�dej�ZGdd�dej�ZGdd�de�Zedkr�e��dS)�N)�support)�VALID_UNDERSCORE_LITERALS�INVALID_UNDERSCORE_LITERALS)�0r)�1�)�9�	)�10�
)Z99�c)�100�d)Z314i:)z 314i:)z314 i:)z  		  314  		  i:z  1x)z  1  rz  1  �� z  		  uȀc@seZdZdS)�IntSubclassN)�__name__�
__module__�__qualname__�rr�2/opt/alt/python37/lib64/python3.7/test/test_int.pyrsrc@s�eZdZdd�Zdd�Zejdd��Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!S)"�IntTestCasescCsT	|�td�d�|�td�d�|�td�d�|�td�d�|�td�d�|�td�d�|�td	�d�|�td
�d�|�td�d�|�td�d�|�td
d�d�x~tD]v\}}xldD]d}x^dD]V}|||}|}|dkr�|tk	r�|}y|�t|�|�Wq�tk
�r$Yq�Xq�Wq�Wq�Wtdtj�}t|�}|�|dtj�|�|t�|�t|dd��tjd�td�}|�|t�td�}|�|t�dtj}|�|d?|d�td�}|�|t�|�t	tdd�|�tdd�d�|�tdd�d�|�ttdd�|�ttdd�|�ttdd �|�ttdd�|�ttd!d�|�ttd!d�|�td"d�d#�|�td$d�d#�|�td%d&�d#�|�td'd(�d#�|�td)d*�d#�|�td+d,�d#�|�td-d �d#�|�td.d/�d#�|�td0d1�d#�|�td2d3�d#�|�td4d�d#�|�td5d6�d#�|�td7d8�d#�|�td9d:�d#�|�td;d�d#�|�td<d=�d#�|�td>d?�d#�|�td@dA�d#�|�tdBdC�d#�|�tdDdE�d#�|�tdFdG�d#�|�tdHdI�d#�|�tdJdK�d#�|�tdLdM�d#�|�tdNdO�d#�|�tdPdQ�d#�|�tdRdS�d#�|�tdTdU�d#�|�tdVdW�d#�|�tdXdY�d#�|�tdZd[�d#�|�td\d]�d#�|�td^d_�d#�|�td`da�d#�|�tdbdc�d#�|�tddd�d�|�tddd�d�|�tded�d�|�tdd�d�|�tdd�d�|�tdfd�d&�|�tdgd�d�|�tdhd�d�|�tdid�d&�|�tdj�dk�|�tdjd1�dk�|�tdd�d�|�tdd �d�|�tdfd�d&�|�tdld�d�|�tdmd �d�|�tdnd�d&�|�ttdod�|�ttdpd�|�ttdqd�|�ttdrd�|�ttdsd �|�ttdtd �|�ttdud �|�ttdvd �|�ttdwd�|�ttdxd�|�ttdyd�|�ttdzd�|�td{d�d|�|�td}d�d|�|�td~d&�d|�|�tdd(�d|�|�td�d*�d|�|�td�d,�d|�|�td�d �d|�|�td�d/�d|�|�td�d1�d|�|�td�d3�d|�|�td�d�d|�|�td�d6�d|�|�td�d8�d|�|�td�d:�d|�|�td�d�d|�|�td�d=�d|�|�td�d?�d|�|�td�dA�d|�|�td�dC�d|�|�td�dE�d|�|�td�dG�d|�|�td�dI�d|�|�td�dK�d|�|�td�dM�d|�|�td�dO�d|�|�td�dQ�d|�|�td�dS�d|�|�td�dU�d|�|�td�dW�d|�|�td�dY�d|�|�td�d[�d|�|�td�d]�d|�|�td�d_�d|�|�td�da�d|�|�td�dc�d|�dS)�Ni:g��Q�	@�g��Q�	����g333333@g333333�g@g�z-3z -3 u -3 r
�)r�+�-)rr�	z  		  r���rg}Ô%�I�Tg}Ô%�I���AX111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111�Z0o123r�SZ0x123i#�0xZ0o�Z0bZ!100000000000000000000000000000000lZ102002022201221111211Z10000000000000000�Z32244002423141�Z
1550104015504�Z211301422354�Z40000000000Z12068657454r	Z
4294967296rZ
1904440554�Z	9ba461594Z	535a79889�
Z	2ca5b7464�Z	1a20dcd81�Z	100000000Za7ffda91�Z704he7g4�Z4f5aff66�Z3723ai4g�Z281d55i4�Z1fj8b184�Z1606k7ic�Zmb994ag�Zhek2mgl�Zdnchbnm�Zb28jpdm�Z8pfgih4�Z76beigg�Z5qmcpqg�Z4q0jto4�Z4000000� Z3aokq94�!Z2qhxjli�"Z2br45qb�#Z1z141z4�$z 0o123  Z000Z0b100z	 0O123   z 0X123  z 0B100 Z0123�{Z0X123Z0O123Z0B100Z0b2Z0b02Z0B2Z0B02Z0o8Z0o08Z0O8Z0O08Z0xgZ0x0gZ0XgZ0X0gZ!100000000000000000000000000000001lZ102002022201221111212Z10000000000000001Z32244002423142Z
1550104015505Z211301422355Z40000000001Z12068657455Z
4294967297Z
1904440555Z	9ba461595Z	535a7988aZ	2ca5b7465Z	1a20dcd82Z	100000001Za7ffda92Z704he7g5Z4f5aff67Z3723ai4hZ281d55i5Z1fj8b185Z1606k7idZmb994ahZhek2mgmZdnchbnnZb28jpdnZ8pfgih5Z76beighZ5qmcpqhZ4q0jto5Z4000001Z3aokq95Z2qhxjljZ2br45qcZ1z141z5)
�assertEqual�int�L�
ValueError�repr�sys�maxsizeZassertIsInstance�assertRaises�	TypeError)�self�s�vZsign�prefixZssZvv�xrrr�
test_basic#s


zIntTestCases.test_basicc	sxZtD]R�t�fdd�dD��r"q|�t�d�t���|�t�d�t��dd�d��qWx4tD],�t�fdd�dD��r~qb|�tt�d�qbW|�tdd	�d
�|�td�d�|�td
�d�|�ttd�|�ttd�|�ttd�|�ttd�dS)Nc3s|]}|�kVqdS)Nr)�.0�ch)�litrr�	<genexpr>�sz0IntTestCases.test_underscores.<locals>.<genexpr>z.eEjJr�_rc3s|]}|�kVqdS)Nr)rPrQ)rRrrrS�sZ1_00rr	Z0_100rs1_00Z_100z+_100Z1__00Z100_)	r�anyrArB�eval�replacerrHrD)rJr)rRr�test_underscores�s 
$
zIntTestCases.test_underscorescCsD|�td�d�|�td�d�|�td�d�|�td�d�dS)Nr
rz-1rs10s-1)�assertIsrB)rJrrr�test_small_ints�szIntTestCases.test_small_intscCs|�t�d�dS)Nr)rArB)rJrrr�test_no_args�szIntTestCases.test_no_argsc	Cs~|�tddd�d�|�td��tdd�WdQRX|�td��tddd�WdQRX|jttd	d�|jttd
d�dS)Nr
r)�baser$zkeyword argumentg333333�?)rN)rNr\rr)rArB�assertRaisesRegexrIrH)rJrrr�test_keyword_args�szIntTestCases.test_keyword_argsc	Cs�|�tdd�d�|�t��tdd�WdQRX|�t��tdd�WdQRX|�t��tdd�WdQRX|�t��tdddd	d
�WdQRX|�t��tddd	d
�WdQRXx&tdd�D]}|�td|d
�d�q�WdS)z9Testing the supported limits of the int() base parameter.rr%rrN�%is���r��)r\)rArBrHrD�range)rJr\rrr�test_int_base_limitssz!IntTestCases.test_int_base_limitsc	CsD|�t��tdd�WdQRX|�t��tdd�WdQRXdS)z2Not integer types are not valid bases; issue16772.rg@Ng@)rHrIrB)rJrrr�test_int_base_bad_typessz$IntTestCases.test_int_base_bad_typesc
Cs�Gdd�dt�}x>ddddddfD]$}|�t��td|�WdQRXq(W|�td|d�d	�d
�|�td|d�d	�d�|�td|d
�d	�d�dS)Nc@seZdZdd�Zdd�ZdS)z9IntTestCases.test_int_base_indexable.<locals>.MyIndexablecSs
||_dS)N)�value)rJrdrrr�__init__szBIntTestCases.test_int_base_indexable.<locals>.MyIndexable.__init__cSs|jS)N)rd)rJrrr�	__index__szCIntTestCases.test_int_base_indexable.<locals>.MyIndexable.__index__N)rrrrerfrrrr�MyIndexablesrgrrrr_Z43Z101)r\r%r�er?i)�objectrHrDrBrA)rJrgr\rrr�test_int_base_indexablesz$IntTestCases.test_int_base_indexablecs2Gdd�dt��Gdd�dt�}Gdd�dt�}tt�fdd�||tg}yd	d
lm�Wntk
rlYnX|��fdd��x�|D]�}|d�}|�t|����|�	t
|�d
�t|tttf�r�|�	t
|d�d�n&d}|�t
|��t
|d�WdQRX|�td��t
|d��WdQRXWdQRXq�WdS)Nc@seZdZdS)z<IntTestCases.test_non_numeric_input_types.<locals>.CustomStrN)rrrrrrr�	CustomStr.srkc@seZdZdS)z>IntTestCases.test_non_numeric_input_types.<locals>.CustomBytesN)rrrrrrr�CustomBytes/srlc@seZdZdS)zBIntTestCases.test_non_numeric_input_types.<locals>.CustomByteArrayN)rrrrrrr�CustomByteArray0srmcs�|���S)N)�decode)�b)rkrr�<lambda>5�z;IntTestCases.test_non_numeric_input_types.<locals>.<lambda>r)�arraycs
�d|�S)N�Br)ro)rrrrrp?rqs100rrr$zcan't convert non-stringzinvalid literalsAAAAAAAAAAAAAAAA)�str�bytes�	bytearray�
memoryviewrr�ImportError�append�subTest�typerArB�
isinstancer]rIrD)rJrlrmZ	factories�frN�msgr)rkrrr�test_non_numeric_input_types+s2

z)IntTestCases.test_non_numeric_input_typescCs�|�ttd�dd��d�|�ttd�dd��d�|�ttd�dd��d�|�ttd�dd��d�|�ttd�dd��d�dS)	Ns123rrr2s123s123 s123As1234)rArBrw)rJrrr�test_int_memoryviewNs
z IntTestCases.test_int_memoryviewcCs|�ttd�dS)Nz1.2)rHrDrB)rJrrr�test_string_floatUszIntTestCases.test_string_floatcsGdd�d�}|�tt|��Gdd�dt�}|�tt|��Gdd�d�}|�t|��d�Gdd	�d	�}�x�t|fD�]�}Gd
d�d|�}|�t|��d�Gdd
�d
|�}|�t|��d�Gdd�d|�}|�t��t|��WdQRX�x
t|fD]�}	Gdd�d|	��G�fdd�d|�}
|�t|
��d�G�fdd�d|	��G�fdd�d|�}yt|��Wn4tk
�r�}z|�t|�d�Wdd}~XYnX|�d||	ff�Gdd�d|	��G�fdd�d|�}
|�t��t|
��WdQRXq�WqxWdS)Nc@seZdZdS)z>IntTestCases.test_intconversion.<locals>.ClassicMissingMethodsN)rrrrrrr�ClassicMissingMethodsZsr�c@seZdZdS)z7IntTestCases.test_intconversion.<locals>.MissingMethodsN)rrrrrrr�MissingMethods^sr�c@seZdZdd�ZdS)z-IntTestCases.test_intconversion.<locals>.Foo0cSsdS)N�*r)rJrrr�__int__csz5IntTestCases.test_intconversion.<locals>.Foo0.__int__N)rrrr�rrrr�Foo0bsr�r�c@seZdZdS)z0IntTestCases.test_intconversion.<locals>.ClassicN)rrrrrrr�Classichsr�c@seZdZdd�Zdd�ZdS)z:IntTestCases.test_intconversion.<locals>.IntOverridesTrunccSsdS)Nr�r)rJrrrr�lszBIntTestCases.test_intconversion.<locals>.IntOverridesTrunc.__int__cSsdS)Ni�r)rJrrr�	__trunc__nszDIntTestCases.test_intconversion.<locals>.IntOverridesTrunc.__trunc__N)rrrr�r�rrrr�IntOverridesTruncksr�c@seZdZdd�ZdS)z2IntTestCases.test_intconversion.<locals>.JustTrunccSsdS)Nr�r)rJrrrr�ssz<IntTestCases.test_intconversion.<locals>.JustTrunc.__trunc__N)rrrr�rrrr�	JustTruncrsr�c@seZdZdd�ZdS)z9IntTestCases.test_intconversion.<locals>.ExceptionalTrunccSsdddS)Nrrr)rJrrrr�xszCIntTestCases.test_intconversion.<locals>.ExceptionalTrunc.__trunc__N)rrrr�rrrr�ExceptionalTruncwsr�c@seZdZdd�ZdS)z1IntTestCases.test_intconversion.<locals>.IntegralcSsdS)Nr�r)rJrrrr�sz9IntTestCases.test_intconversion.<locals>.Integral.__int__N)rrrr�rrrr�Integral~sr�cseZdZ�fdd�ZdS)z;IntTestCases.test_intconversion.<locals>.TruncReturnsNonIntcs��S)Nr)rJ)r�rrr��szEIntTestCases.test_intconversion.<locals>.TruncReturnsNonInt.__trunc__N)rrrr�r)r�rr�TruncReturnsNonInt�sr�cseZdZ�fdd�ZdS)z4IntTestCases.test_intconversion.<locals>.NonIntegralcs��S)Nr)rJ)�NonIntegralrrr��sz>IntTestCases.test_intconversion.<locals>.NonIntegral.__trunc__N)rrrr�r)r�rrr��sr�cseZdZ�fdd�ZdS)z@IntTestCases.test_intconversion.<locals>.TruncReturnsNonIntegralcs��S)Nr)rJ)r�rrr��szJIntTestCases.test_intconversion.<locals>.TruncReturnsNonIntegral.__trunc__N)rrrr�r)r�rr�TruncReturnsNonIntegral�sr�z2__trunc__ returned non-Integral (type NonIntegral)z!Failed to raise TypeError with %sc@seZdZdd�ZdS)z/IntTestCases.test_intconversion.<locals>.BadIntcSsdS)NgE@r)rJrrrr��sz7IntTestCases.test_intconversion.<locals>.BadInt.__int__N)rrrr�rrrr�BadInt�sr�cseZdZ�fdd�ZdS)z;IntTestCases.test_intconversion.<locals>.TruncReturnsBadIntcs��S)Nr)rJ)r�rrr��szEIntTestCases.test_intconversion.<locals>.TruncReturnsBadInt.__trunc__N)rrrr�r)r�rr�TruncReturnsBadInt�sr�)rHrIrBrirA�ZeroDivisionErrorrtZfail)rJr�r�r�r�r\r�r�r�Ztrunc_result_baser�r��er�r)r�r�r�r�test_intconversionXs@
zIntTestCases.test_intconversioncCsXGdd�dt�}Gdd�dt�}|d�}|�|d�|�t|�d�|�tt|��dS)Nc@seZdZdd�ZdS)z6IntTestCases.test_int_subclass_with_int.<locals>.MyIntcSsdS)Nr�r)rJrrrr��sz>IntTestCases.test_int_subclass_with_int.<locals>.MyInt.__int__N)rrrr�rrrr�MyInt�sr�c@seZdZdd�ZdS)z7IntTestCases.test_int_subclass_with_int.<locals>.BadIntcSsdS)NgE@r)rJrrrr��sz?IntTestCases.test_int_subclass_with_int.<locals>.BadInt.__int__N)rrrr�rrrrr��sr�r'r�)rBrArHrI)rJr�r�Zmy_intrrr�test_int_subclass_with_int�sz'IntTestCases.test_int_subclass_with_intc	sPGdd�d��Gdd�dt�}G�fdd�d�}Gdd�d�}��}|�t��t|�}WdQRX|�|d	�|�t|�t�|�}|�t��t|�}WdQRX|�|d	�|�t|�t�|�}|�t��t|�}WdQRX|�|d	�|�t|�t�|�}t|�}|�|d	�|�t|�t�t|�}|�|d	�|�t|�t�dS)
Nc@seZdZdd�ZdS)z:IntTestCases.test_int_returns_int_subclass.<locals>.BadIntcSsdS)NTr)rJrrrr��szBIntTestCases.test_int_returns_int_subclass.<locals>.BadInt.__int__N)rrrr�rrrrr��sr�c@seZdZdd�ZdS)z;IntTestCases.test_int_returns_int_subclass.<locals>.BadInt2cSsdS)NTr)rJrrrr��szCIntTestCases.test_int_returns_int_subclass.<locals>.BadInt2.__int__N)rrrr�rrrr�BadInt2�sr�cseZdZ�fdd�ZdS)zFIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsBadIntcs��S)Nr)rJ)r�rrr��szPIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsBadInt.__trunc__N)rrrr�r)r�rrr��sr�c@seZdZdd�ZdS)zKIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsIntSubclasscSsdS)NTr)rJrrrr��szUIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsIntSubclass.__trunc__N)rrrr�rrrr�TruncReturnsIntSubclass�sr�r)rBZassertWarns�DeprecationWarningrArYr{r)rJr�r�r�Zbad_int�nZgood_intr)r�r�test_int_returns_int_subclass�s4z*IntTestCases.test_int_returns_int_subclasscs�d�fdd�	}|d�|d�|d�|d�|dd�|dd	�|dd
�|dd	�|dd
�|d�|dd�|d
�|d
d�|d�|dd�dS)Nc	sj�jtd||fd��"}|dkr*t|�n
t||�WdQRX��|jjdd|dkrZdn||f�dS)Nzint(%r, %r))r~rz*invalid literal for int() with base %d: %rr)rHrDrBrA�	exception�args)rKr\�cm)rJrr�check�s
z.IntTestCases.test_error_message.<locals>.check�½u123½z  123 456  z123rz123 245r/rz123245s123s123�u123�)Nr)rJr�r)rJr�test_error_message�s 






zIntTestCases.test_error_messagecCsL|�tdd�d�|�tdd�d�|�tdd�d	�|�td
d�d�dS)
NZ=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_1riUUUUZ1_2_3_4_5_6_7_0_1_2_3r#iSp�SZ1_2_3_4_5_6_7_8_9rl�g�FZ
1_2_3_4_5_6_7r;i�2D)rArB)rJrrr�test_issue31619s
zIntTestCases.test_issue31619N)rrrrOrXrZcpython_onlyrZr[r^rbrcrjrr�r�r�r�r�r�r�rrrrr!s"8
#M+!rcs�eZdZeZ�fdd�Z�fdd�Zdd�Zdd�Zdd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Z�ZS)�IntStrDigitLimitsTestscs"t���t��|_t�d�dS)Ni)�super�setUprF�get_int_max_str_digits�_previous_limit�set_int_max_str_digits)rJ)�	__class__rrr�s

zIntStrDigitLimitsTests.setUpcst�|j�t���dS)N)rFr�r�r��tearDown)rJ)r�rrr�szIntStrDigitLimitsTests.tearDownc	Csp|�t��d�|�t��d�t�d��,|�t��d�|�dd�}t|�WdQRX|�t��d�dS)Nri Nr)	Z
assertGreaterrFr��
assertLessr�adjust_int_max_str_digitsrA�	int_classrt)rJ�irrr�test_disabled_limitsz*IntStrDigitLimitsTests.test_disabled_limitcCsz|j}t��}|d|�|dd|�|d|d�|dd|�|dd|�|�ttd|d��|�dS)z&Ignore the +/- sign and space padding.rrrrrrN)r�rFr�rA�lenrt)rJr��	maxdigitsrrr�test_max_str_digits_edge_casessz5IntStrDigitLimitsTests.test_max_str_digits_edge_casesNc	Cs:|�t��&|dkr |�|�n|�||�WdQRXdS)N)rHrDr�)rJr�r\rrrr�*szIntStrDigitLimitsTests.checkc	Cs�t��}|�d|d�|�dd|d�|�d|dd�|�dd|d�|�dd|d�|�d|d�d|}|�t��t|�WdQRXdS)Nrrrrrr)rFr�r�rHrDrt)rJr�r�rrr�test_max_str_digits1sz*IntStrDigitLimitsTests.test_max_str_digitsc
Csxt��}|dkst|��tj}|�dkr.tj}tddd��dd�}d}t�|��|�}t	|�}Wd	QRX|�|}|�
t|�|�|d
kr�t�
d|�d���t�td
|���4|�t��}|�}t	|�Wd	QRX|�|}	Wd	QRX|�dt	|j��|�|	|d�tddd��dd�}
|�t��}|�}t	|
�Wd	QRX|�|}|�dt	|j��|�||d�d	S)z?Regression test: ensure we fail before performing O(N**2) work.iP�rr"�ci�r)r\i�1Ng�?z"slow" conversion took only z	 seconds.gףp=
��?�
conversionri �)rFr��AssertionError�time�process_time�	monotonicrBrr�rtrAr��unittest�SkipTestrHrD�assertInr��assertLessEqualr�)rJr��get_timeZhuge_int�digits�startZhuge_decimal�seconds_to_convert�err�seconds_to_fail_hugeZextra_huge_int�seconds_to_fail_extra_hugerrr�+test_denial_of_service_prevented_int_to_str?s8


zBIntStrDigitLimitsTests.test_denial_of_service_prevented_int_to_strc
CsHt��}|dkst|��tj}|�dkr.tj}d}d|}t�|��|�}t|�WdQRX|�|}|dkr�t	�
d|�d���t�|d	��4|�t��}|�}t|�WdQRX|�|}WdQRX|�
d
t|j��|�||d�dd
}	|�t��}|�}t|	�WdQRX|�|}
|�
d
t|j��|�|
|d�dS)z?Regression test: ensure we fail before performing O(N**2) work.i��riD
�8Ng�?z"slow" conversion took only z	 seconds.rr�r�7i�O)rFr�r�r�r�r�rr�rBr�r�rHrDr�rtr�r�)rJr�r�r�Zhuger�r�r�r�Z
extra_huger�rrr�+test_denial_of_service_prevented_str_to_intjs6


zBIntStrDigitLimitsTests.test_denial_of_service_prevented_str_to_intc
Csbt��}xTdD]L}|j|d��6|�d|d|�|dks@t�|�dd|�WdQRXqWdS)z-The limit does not apply to power of 2 bases.)rr$r#rr;)r\rri��N)rFr�rzr�r�)rJr�r\rrr�!test_power_of_two_bases_unlimited�s
z8IntStrDigitLimitsTests.test_power_of_two_bases_unlimitedcCsXt��}|d}d|}d|}|�|�|�|�|�|�d��|�|�d��dS)NrZ111Z1_11Z_111)rFr�r�r�)rJr�ZtriplesrKZs_rrr�test_underscores_ignored�s

z/IntStrDigitLimitsTests.test_underscores_ignoredcCsh|j}t��}d|}||�}|d|���}||ks8t�|d|���}||ksTt�t|�t|�dS)N�5rr)r�rFr�r�rt)rJr��
max_digitsrKr�Zpos_iZneg_irrr�test_sign_not_counted�sz,IntStrDigitLimitsTests.test_sign_not_countedc	Cs�|j}t��}d|}|||�}|dkrH|�t��t|�WdQRXn|dkrXt|�|�t��}||�d�|�WdQRXdS)N�2rr)r�rFr�rHrDrt)rJr\r�r�rKr�r�rrr�_other_base_helper�s
z)IntStrDigitLimitsTests._other_base_helperc	CsPd}|j|d��|�|�WdQRXd}|j|d��|�|�WdQRXdS)Nr)r\r?)rzr�)rJr\rrr�test_int_from_other_bases�sz0IntStrDigitLimitsTests.test_int_from_other_bases)N)rrrrBr�r�r�r�r�r�r�r�r�r�r�r�r�r��
__classcell__rr)r�rr�s	
+(

r�c@seZdZeZdS)�IntSubclassStrDigitLimitsTestsN)rrrrr�rrrrr��sr��__main__)rFr�r�ZtestrZtest.test_grammarrrrErGrDrCrBrZTestCaserr�r�r�mainrrrr�<module>s@
jB