Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/test_abstract_numbers.cpython-312.pyc

�

&Μg@����dZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
d�ZGd�dej�Z
Gd�dej�Zed	k(rej �yy)
zUnit tests for numbers.py.�N)�Complex�Real�Rational�Integral�Numberc��d�}t|�D](}	t||�}|jr
t|||��*tj|�|S#t$rY�MwxYw)Nc��t���N)�NotImplementedError)�args�kwargss  �7/usr/local/lib/python3.12/test/test_abstract_numbers.py�not_implementedz#concretize.<locals>.not_implementeds��!�#�#�)�dir�getattr�__isabstractmethod__�setattr�AttributeError�abc�update_abstractmethods)�clsr�name�values    r�
concretizer
sg��$��C���	��C��&�E��)�)���T�?�3��	����s�#��J���	��	�s�%A�	A�Ac��eZdZd�Zd�Zd�Zy)�TestNumbersc�.�|jttt��|jttt��|jttt
��|jttt��|jttt��|jdtd�j�|jdtd�j�|jdtd�j��|jdtd�j��|jdtd�j�|jdtd�j�y)N�ri�����)�
assertTrue�
issubclass�intrrrrr�assertEqual�real�imag�	conjugate�	numerator�denominator��selfs r�test_intzTestNumbers.test_ints������
�3��1�2����
�3��1�2����
�3��-�.����
�3��0�1����
�3��/�0�����C��F�K�K�(�����C��F�K�K�(�����C��F�,�,�.�/�����S��W�.�.�0�1�����C��F�,�,�-�����C��F�.�.�/rc��|jttt��|jttt��|jttt��|jttt��|jttt��|jdtd�j�|jdtd�j�|jdtd�j��|jdtd�j��y)Ng333333@rg333333�)
�assertFalser"�floatrrr!rrrr$r%r&r'r*s r�
test_floatzTestNumbers.test_float(s�������E�8�4�5�����E�8�4�5����
�5�$�/�0����
�5�'�2�3����
�5�&�1�2�����e�C�j�o�o�.�����E�#�J�O�O�,�����e�C�j�2�2�4�5�����u�T�{�4�4�6�7rc��|jttt��|jttt��|jttt
��|j
ttt��|j
ttt��tdd�tdd�}}|jttj|�|jttj||�|jtt||�|jttj ||�|jtt"|�|jtt$|�y)N���r )r.r"�complexrrrr!rr�assertRaises�	TypeError�math�trunc�operator�mod�divmod�floordivr/r#)r+�c1�c2s   r�test_complexzTestNumbers.test_complex4s�������G�X�6�7�����G�X�6�7�����G�T�2�3����
�7�G�4�5����
�7�F�3�4���A����!��B�����)�T�Z�Z��4����)�X�\�\�2�r�:����)�V�R��4����)�X�%6�%6��B�?����)�U�B�/����)�S�"�-rN)�__name__�
__module__�__qualname__r,r0r@�rrrrs��0�
8�.rrc�$�eZdZd�Zd�Zd�Zd�Zy)�TestNumbersDefaultMethodsc���tG�fd�dt���|jt�dd���|jt�dd���|jt�dd���|j	t�dd���|j�dd�t
dd�z
�dd��|jt
dd��dd�z
�dd��y)Nc�N��eZdZd�Zed��Zed��Z�fd�Z�fd�Zd�Z	y)�9TestNumbersDefaultMethods.test_complex.<locals>.MyComplexc� �||_||_yr
)�r�i)r+r%r&s   r�__init__zBTestNumbersDefaultMethods.test_complex.<locals>.MyComplex.__init__Is�������rc��|jSr
)rKr*s rr%z>TestNumbersDefaultMethods.test_complex.<locals>.MyComplex.realM����v�v�
rc��|jSr
)rLr*s rr&z>TestNumbersDefaultMethods.test_complex.<locals>.MyComplex.imagQrOrc���t|t�r7�|j|jz|j|jz�St�r
)�
isinstancerr&r%r)r+�other�	MyComplexs  �r�__add__zATestNumbersDefaultMethods.test_complex.<locals>.MyComplex.__add__Us?����e�W�-�$�T�Y�Y����%;�%)�Y�Y����%;�=�=�)�)rc�B���|j|j�Sr
)r%r&�r+rTs �r�__neg__zATestNumbersDefaultMethods.test_complex.<locals>.MyComplex.__neg__[s��� �$�)�)��d�i�i�Z�8�8rc��t|t�r4|j|jk(xr|j|jk(St|t�r*|jdk(xr|j|jk(Sy)Nr)rRrr&r%r�r+rSs  r�__eq__z@TestNumbersDefaultMethods.test_complex.<locals>.MyComplex.__eq__^s`���e�W�-��9�9��
�
�2�N�t�y�y�E�J�J�7N�N��e�V�,��9�9��>�E�d�i�i�5�:�:�.E�E�-rN)
rArBrCrM�propertyr%r&rUrXr[)rTs�rrTrIGs@���
��
��
��
��
�
*�
9�
FrrTr rr3r2)rrr!�boolr.r$r5rWs @rr@z&TestNumbersDefaultMethods.test_complexFs����	�	F��	F�
�	F�:	
����Y�q�!�_�-�.�����Y�q�!�_�-�.�����Y�q�!�_�-�.�����i��1�o�.�/�	
����1�a��7�1�a�=�8�)�A�q�/�J�	
�����A���1�a��8�)�A�q�/�Jrc���tGd�dt��}|jt|d�d�d�|jtd|d��d�|jt	|d��d�|j|d�j
d�|j|d�jd�|j|d	�j�d	�y)
Nc�6�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	y)	�3TestNumbersDefaultMethods.test_real.<locals>.MyRealc��||_yr
��n�r+rcs  rrMz<TestNumbersDefaultMethods.test_real.<locals>.MyReal.__init__s�	����rc��|jSr
rbr*s r�__pos__z;TestNumbersDefaultMethods.test_real.<locals>.MyReal.__pos__v����v�v�
rc�,�t|j�Sr
)r/rcr*s r�	__float__z=TestNumbersDefaultMethods.test_real.<locals>.MyReal.__float__ys���T�V�V�}�$rc� �|j|zSr
rbrZs  r�__floordiv__z@TestNumbersDefaultMethods.test_real.<locals>.MyReal.__floordiv__|s���v�v���&rc� �||jzSr
rbrZs  r�
__rfloordiv__zATestNumbersDefaultMethods.test_real.<locals>.MyReal.__rfloordiv__s�������&rc� �|j|zSr
rbrZs  r�__mod__z;TestNumbersDefaultMethods.test_real.<locals>.MyReal.__mod__�s���v�v��~�%rc� �||jzSr
rbrZs  r�__rmod__z<TestNumbersDefaultMethods.test_real.<locals>.MyReal.__rmod__�s���t�v�v�~�%rN)
rArBrCrMrgrjrlrnrprrrDrr�MyRealr`qs%��
�
�
%�
'�
'�
&�
&rrsr2r3)r r r y�?r�{)rrr$r<r5r%r&r')r+rss  r�	test_realz#TestNumbersDefaultMethods.test_realps���	�	&�T�	&�
�	&�.	
�����q�	�1�-�v�6�	
�����6�!�9�-�v�6�	
�������+�T�2�	
���������+�	
���������+�	
������.�.�0�#�6rc�x�tGd�dt��}|jt|dd��d�y)Nc�2�eZdZd�Zed��Zed��Zy)�;TestNumbersDefaultMethods.test_rational.<locals>.MyRationalc� �||_||_yr
)rc�d)r+r(r)s   rrMzDTestNumbersDefaultMethods.test_rational.<locals>.MyRational.__init__�s��"���$��rc��|jSr
rbr*s rr(zETestNumbersDefaultMethods.test_rational.<locals>.MyRational.numerator�rOrc��|jSr
)rzr*s rr)zGTestNumbersDefaultMethods.test_rational.<locals>.MyRational.denominator�rOrN)rArBrCrMr\r(r)rDrr�
MyRationalrx�s/��
%��
��
��
��
rr}�r3g@)rrr$r/)r+r}s  r�
test_rationalz'TestNumbersDefaultMethods.test_rational�s9��	�	��	�
�	�	
����z�!�Q�/�0�#�6rc�T�tGd�dt��}|jtj|d��d�|jt|d��d�|j|d�jd�|j|d�jd�y)Nc��eZdZd�Zd�Zd�Zy)�;TestNumbersDefaultMethods.test_integral.<locals>.MyIntegralc��||_yr
rbrds  rrMzDTestNumbersDefaultMethods.test_integral.<locals>.MyIntegral.__init__�rerc��|jSr
rbr*s rrgzCTestNumbersDefaultMethods.test_integral.<locals>.MyIntegral.__pos__�rhrc��|jSr
rbr*s r�__int__zCTestNumbersDefaultMethods.test_integral.<locals>.MyIntegral.__int__�rhrN)rArBrCrMrgr�rDrr�
MyIntegralr��s��
�
�
rr�rtg�^@r )rrr$r:�indexr/r(r))r+r�s  r�
test_integralz'TestNumbersDefaultMethods.test_integral�s���	�	��	�
�	�	
������
�3��8�#�>�	
����z�#��/��7�	
����C��2�2�C�8�	
����C��4�4�a�8rN)rArBrCr@rurr�rDrrrFrFEs��(K�T(7�V7�&9rrF�__main__)�__doc__rr8r:�unittest�numbersrrrrrr�TestCaserrFrA�mainrDrr�<module>r�sa�� �
����=�=��).�(�#�#�).�X9�� 1� 1�9�D�z���H�M�M�O�r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists