403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.230
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/__pycache__/test_int.cpython-36.opt-2.pyc
3

�
�^�L�@s�ddlZddlZddlmZddlmZmZd d!d"d#d$d%d&d'd(d)eej�ejfde	fd*de	fde	fde	fde	fde	fgZ
Gdd�de�ZGdd�dej
�Zedkr�ej�dS)+�N)�support)�VALID_UNDERSCORE_LITERALS�INVALID_UNDERSCORE_LITERALS�0�1��9�	�10�
�99�c�100�d�314�:� 314�314 �  		  314  		  z  1x�  1  z  1  �� z  		  uȀc@seZdZdS)�IntSubclassN)�__name__�
__module__�__qualname__�rr�-/opt/alt/python36/lib64/python3.6/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)"�IntTestCasescCs\	|jtd�d�|jtd�d�|jtd��d��|jtd�d�|jtd��d��|jtd�d�|jtd��d��|jtd�d��|jtd�d��|jtd�d��|jtd	d
�d
�x�tD]z\}}xpd�D]h}xbd�D]Z}|||}|}|d
k�r�|tk	�r�|}y|jt|�|�Wq�tk
�r(Yq�Xq�Wq�Wq�Wtd�tj�}t|�}|j|dtj�|j|t�|jt|dd��tjd�td�}|j|t�td��}|j|t�d�tj}|j|d?|d�tdd�}|j|t�|jt	tdd�|jtdd�d�|jtdd
�d�|jttdd
�|jttdd�|jttdd�|jttdd�|jttdd�|jttdd�|jtd d�d!�|jtd"d�d!�|jtd#d$�d!�|jtd%d&�d!�|jtd'd(�d!�|jtd)d*�d!�|jtd+d�d!�|jtd,d-�d!�|jtd.d/�d!�|jtd0d1�d!�|jtd2d�d!�|jtd3d4�d!�|jtd5d6�d!�|jtd7d8�d!�|jtd9d
�d!�|jtd:d;�d!�|jtd<d=�d!�|jtd>d?�d!�|jtd@dA�d!�|jtdBdC�d!�|jtdDdE�d!�|jtdFdG�d!�|jtdHdI�d!�|jtdJdK�d!�|jtdLdM�d!�|jtdNdO�d!�|jtdPdQ�d!�|jtdRdS�d!�|jtdTdU�d!�|jtdVdW�d!�|jtdXdY�d!�|jtdZd[�d!�|jtd\d]�d!�|jtd^d_�d!�|jtd`da�d!�|jtdbd�d�|jtdbd�d�|jtdcd�d�|jtdd�d�|jtdd�d�|jtddd�d$�|jtded�d�|jtdfd�d�|jtdgd�d$�|jtdh�di�|jtdhd/�di�|jtdd
�d�|jtdd�d�|jtddd�d$�|jtdjd
�d�|jtdkd�d�|jtdld�d$�|jttdmd�|jttdnd�|jttdod�|jttdpd�|jttdqd�|jttdrd�|jttdsd�|jttdtd�|jttdud
�|jttdvd
�|jttdwd
�|jttdxd
�|jtdyd�dz�|jtd{d�dz�|jtd|d$�dz�|jtd}d&�dz�|jtd~d(�dz�|jtdd*�dz�|jtd�d�dz�|jtd�d-�dz�|jtd�d/�dz�|jtd�d1�dz�|jtd�d�dz�|jtd�d4�dz�|jtd�d6�dz�|jtd�d8�dz�|jtd�d
�dz�|jtd�d;�dz�|jtd�d=�dz�|jtd�d?�dz�|jtd�dA�dz�|jtd�dC�dz�|jtd�dE�dz�|jtd�dG�dz�|jtd�dI�dz�|jtd�dK�dz�|jtd�dM�dz�|jtd�dO�dz�|jtd�dQ�dz�|jtd�dS�dz�|jtd�dU�dz�|jtd�dW�dz�|jtd�dY�dz�|jtd�d[�dz�|jtd�d]�dz�|jtd�d_�dz�|jtd�da�dz�dS)�Ni:g��Q�	@�g333333@g@z-3z -3 u -3 r
�r�+�-r�	�  		  rg}Ô%�I�T�riX�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	100000001Za7ffda92Z704he7g5Z4f5aff67Z3723ai4hZ281d55i5Z1fj8b185Z1606k7idZmb994ahZhek2mgmZdnchbnnZb28jpdnZ8pfgih5Z76beighZ5qmcpqhZ4q0jto5Z4000001Z3aokq95Z2qhxjljZ2br45qcZ1z141z5g��Q�	����g333333�rGg�rGrGrGrG)rr!r")rrr#r$���g}Ô%�I��rH)
�assertEqual�int�L�
ValueError�repr�sys�maxsizeZassertIsInstance�assertRaises�	TypeError)�self�s�v�sign�prefix�ssZvv�xrrr�
test_basic"s


zIntTestCases.test_basiccsxZtD]R�t�fdd�dD��r"q|jt�d�t���|jt�d�t�jdd�d��qWx4tD],�t�fdd�dD��r~qb|jtt�d�qbW|jtdd	�d
�|jtd�d�|jtd
�d�|jttd�|jttd�|jttd�|jttd�dS)Nc3s|]}|�kVqdS)Nr)�.0�ch)�litrr�	<genexpr>�sz0IntTestCases.test_underscores.<locals>.<genexpr>z.eEjJr�_rc3s|]}|�kVqdS)Nr)rZr[)r\rrr]�sZ1_00rr	Z0_100rs1_00Z_100z+_100Z1__00Z100_)	r�anyrIrJ�eval�replacerrPrL)rRr)r\r�test_underscores�s 
$
zIntTestCases.test_underscorescCsD|jtd�d�|jtd�d�|jtd�d�|jtd�d�dS)	Nr
rz-1rs10s-1rHrH)�assertIsrJ)rRrrr�test_small_ints�szIntTestCases.test_small_intscCs|jt�d�dS)Nr)rIrJ)rRrrr�test_no_args�szIntTestCases.test_no_argscCs^|jtdd�d�|jtddd�d�|jtddd�d�|jttd	d�|jttd
d�dS)Ng333333�?)rXrrr%)�baser*)rXrfrr)rIrJrPrQ)rRrrr�test_keyword_args�s
zIntTestCases.test_keyword_argsc)Cs�|jtdd�d�|jt��tdd�WdQRX|jt��tdd�WdQRX|jt��tdd
�WdQRX|jt��tddddd	�WdQRX|jt��tdddd	�WdQRXx&tdd�D]}|jtd|d	�d�q�WdS)Nrr+rr�%i�r%��)rfis���)rIrJrPrL�range)rRrfrrr�test_int_base_limits�sz!IntTestCases.test_int_base_limitscCsD|jt��tdd�WdQRX|jt��tdd�WdQRXdS)Nrg@g@)rPrQrJ)rRrrr�test_int_base_bad_typessz$IntTestCases.test_int_base_bad_typescCs�Gdd�dt�}x>ddddddfD]$}|jt��td|�WdQRXq(W|jtd|d�d	�d
�|jtd|d�d	�d�|jtd|d
�d	�d�dS)Nc@seZdZdd�Zdd�ZdS)z9IntTestCases.test_int_base_indexable.<locals>.MyIndexablecSs
||_dS)N)�value)rRrmrrr�__init__szBIntTestCases.test_int_base_indexable.<locals>.MyIndexable.__init__cSs|jS)N)rm)rRrrr�	__index__szCIntTestCases.test_int_base_indexable.<locals>.MyIndexable.__index__N)rrrrnrorrrr�MyIndexablesrpr%rrrhZ43Z101)rfr+r�erEii)�objectrPrLrJrI)rRrprfrrr�test_int_base_indexablesz$IntTestCases.test_int_base_indexablec"s2Gdd�dt��Gdd�dt�}Gdd�dt�}tt�fdd�||tg}yd	d
lm�Wntk
rlYnX|j�fdd��x�|D]�}|d�}|jt|����|j	t
|�d
�t|tttf�r�|j	t
|d�d�n&d}|jt
|��t
|d�WdQRX|jtd��t
|d��WdQRXWdQRXq�WdS)Nc@seZdZdS)z<IntTestCases.test_non_numeric_input_types.<locals>.CustomStrN)rrrrrrr�	CustomStr+srtc@seZdZdS)z>IntTestCases.test_non_numeric_input_types.<locals>.CustomBytesN)rrrrrrr�CustomBytes,sruc@seZdZdS)zBIntTestCases.test_non_numeric_input_types.<locals>.CustomByteArrayN)rrrrrrr�CustomByteArray-srvcs�|j��S)N)�decode)�b)rtrr�<lambda>2sz;IntTestCases.test_non_numeric_input_types.<locals>.<lambda>r)�arraycs
�d|�S)N�Br)rx)rzrrry<ss100rr%r*zcan't convert non-stringzinvalid literal�Ar sAAAAAAAAAAAAAAAA)�str�bytes�	bytearray�
memoryviewrz�ImportError�appendZsubTest�typerIrJ�
isinstanceZassertRaisesRegexrQrL)rRrurvZ	factories�frX�msgr)rtrzr�test_non_numeric_input_types(s2

z)IntTestCases.test_non_numeric_input_typescCs�|jttd�dd��d�|jttd�dd��d�|jttd�dd��d�|jttd�dd��d�|jttd�dd��d�dS)	Ns123rrr8s123s123 s123As1234)rIrJr�)rRrrr�test_int_memoryviewKs
z IntTestCases.test_int_memoryviewcCs|jttd�dS)Nz1.2)rPrLrJ)rRrrr�test_string_floatRszIntTestCases.test_string_floatc sGdd�d�}|jtt|��Gdd�dt�}|jtt|��Gdd�d�}|jt|��d�Gdd	�d	�}�x�t|fD�]�}Gd
d�d|�}|jt|��d�Gdd
�d
|�}|jt|��d�Gdd�d|�}|jt��t|��WdQRX�x
t|fD]�}	Gdd�d|	��G�fdd�d|�}
|jt|
��d�G�fdd�d|	��G�fdd�d|�}yt|��Wn4tk
�r�}z|jt|�d�WYdd}~XnX|jd||	ff�Gdd�d|	��G�fdd�d|�}
|jt��t|
��WdQRXq�WqxWdS)Nc@seZdZdS)z>IntTestCases.test_intconversion.<locals>.ClassicMissingMethodsN)rrrrrrr�ClassicMissingMethodsWsr�c@seZdZdS)z7IntTestCases.test_intconversion.<locals>.MissingMethodsN)rrrrrrr�MissingMethods[sr�c@seZdZdd�ZdS)z-IntTestCases.test_intconversion.<locals>.Foo0cSsdS)N�*r)rRrrr�__int__`sz5IntTestCases.test_intconversion.<locals>.Foo0.__int__N)rrrr�rrrr�Foo0_sr�r�c@seZdZdS)z0IntTestCases.test_intconversion.<locals>.ClassicN)rrrrrrr�Classicesr�c@seZdZdd�Zdd�ZdS)z:IntTestCases.test_intconversion.<locals>.IntOverridesTrunccSsdS)Nr�r)rRrrrr�iszBIntTestCases.test_intconversion.<locals>.IntOverridesTrunc.__int__cSsdS)Nr&i�r)rRrrr�	__trunc__kszDIntTestCases.test_intconversion.<locals>.IntOverridesTrunc.__trunc__N)rrrr�r�rrrr�IntOverridesTrunchsr�c@seZdZdd�ZdS)z2IntTestCases.test_intconversion.<locals>.JustTrunccSsdS)Nr�r)rRrrrr�psz<IntTestCases.test_intconversion.<locals>.JustTrunc.__trunc__N)rrrr�rrrr�	JustTruncosr�c@seZdZdd�ZdS)z9IntTestCases.test_intconversion.<locals>.ExceptionalTrunccSsdddS)Nrrr)rRrrrr�uszCIntTestCases.test_intconversion.<locals>.ExceptionalTrunc.__trunc__N)rrrr�rrrr�ExceptionalTrunctsr�c@seZdZdd�ZdS)z1IntTestCases.test_intconversion.<locals>.IntegralcSsdS)Nr�r)rRrrrr�|sz9IntTestCases.test_intconversion.<locals>.Integral.__int__N)rrrr�rrrr�Integral{sr�cseZdZ�fdd�ZdS)z;IntTestCases.test_intconversion.<locals>.TruncReturnsNonIntcs��S)Nr)rR)r�rrr��szEIntTestCases.test_intconversion.<locals>.TruncReturnsNonInt.__trunc__N)rrrr�r)r�rr�TruncReturnsNonIntsr�cseZdZ�fdd�ZdS)z4IntTestCases.test_intconversion.<locals>.NonIntegralcs��S)Nr)rR)�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)rR)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)rRrrrr��sz7IntTestCases.test_intconversion.<locals>.BadInt.__int__N)rrrr�rrrr�BadInt�sr�cseZdZ�fdd�ZdS)z;IntTestCases.test_intconversion.<locals>.TruncReturnsBadIntcs��S)Nr)rR)r�rrr��szEIntTestCases.test_intconversion.<locals>.TruncReturnsBadInt.__trunc__N)rrrr�r)r�rr�TruncReturnsBadInt�sr�)rPrQrJrrrI�ZeroDivisionErrorr}Zfail)rRr�r�r�r�rfr�r�r�Ztrunc_result_baser�r��er�r)r�r�r�r�test_intconversionUs@
zIntTestCases.test_intconversioncCsXGdd�dt�}Gdd�dt�}|d�}|j|d�|jt|�d�|jtt|��dS)Nc@seZdZdd�ZdS)z6IntTestCases.test_int_subclass_with_int.<locals>.MyIntcSsdS)Nr�r)rRrrrr��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)rRrrrr��sz?IntTestCases.test_int_subclass_with_int.<locals>.BadInt.__int__N)rrrr�rrrrr��sr�r-r�)rJrIrPrQ)rRr�r�Zmy_intrrr�test_int_subclass_with_int�sz'IntTestCases.test_int_subclass_with_intcsPGdd�d��Gdd�dt�}G�fdd�d�}Gdd�d�}��}|jt��t|�}WdQRX|j|d	�|jt|�t�|�}|jt��t|�}WdQRX|j|d	�|jt|�t�|�}|jt��t|�}WdQRX|j|d	�|jt|�t�|�}t|�}|j|d	�|jt|�t�t|�}|j|d	�|jt|�t�dS)
Nc@seZdZdd�ZdS)z:IntTestCases.test_int_returns_int_subclass.<locals>.BadIntcSsdS)NTr)rRrrrr��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)rRrrrr��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)rR)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)rRrrrr��szUIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsIntSubclass.__trunc__N)rrrr�rrrr�TruncReturnsIntSubclass�sr�r)rJZassertWarns�DeprecationWarningrIrcr�r)rRr�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�j|jjdd|dkrZdn||f�dS)Nzint(%r, %r))r�rz*invalid literal for int() with base %d: %rr)rPrLrJrIZ	exception�args)rSrf�cm)rRrr�check�s
z.IntTestCases.test_error_message.<locals>.check�½u123½z  123 456  z123rz123 245r5r z123245s123s123�u123�)Nr)rRr�r)rRr�test_error_message�s 






zIntTestCases.test_error_messagecCsL|jtdd�d�|jtdd�d�|jtdd�d	�|jtd
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_1r%iUUUUZ1_2_3_4_5_6_7_0_1_2_3r)iSp�SZ1_2_3_4_5_6_7_8_9r l�g�FZ
1_2_3_4_5_6_7rAi�2D)rIrJ)rRrrr�test_issue31619�s
zIntTestCases.test_issue31619N)rrrrYrbrZcpython_onlyrdrergrkrlrsr�r�r�r�r�r�r�r�rrrrr s"8#M+!r�__main__)rr)rr)rr	)r
r)rr
)rr)rr)rr)rr)rr)rr)rNZunittestZtestrZtest.test_grammarrrrMrOrLrKrJrZTestCaserr�mainrrrr�<module>s8
h

Youez - 2016 - github.com/yon3zu
LinuXploit