Sindbad~EG File Manager
�
&Μg@ � �� � d Z ddlZddlZddlZddlZddlmZmZmZm Z m
Z
d� Z G d� dej � Z
G d� dej � Zed k( r ej � yy)
zUnit tests for numbers.py.� N)�Complex�Real�Rational�Integral�Numberc � � d� }t | � D ]( } t | |� }|j r
t | ||� �* t j | � | S # t $ r Y �Mw xY w)Nc � � t � ��N)�NotImplementedError)�args�kwargss �7/usr/local/lib/python3.12/test/test_abstract_numbers.py�not_implementedz#concretize.<locals>.not_implemented s � �!�#�#� )�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 � � e Zd Zd� Zd� Zd� Zy)�TestNumbersc �. � | j t t t � � | j t t t � � | j t t t
� � | j t t t � � | j t t t � � | j dt d� j � | j dt d� j � | j dt d� j � � | j dt d� j � � | j dt d� j � | j dt d� j � y )N� r i����� )�
assertTrue�
issubclass�intr r r r r �assertEqual�real�imag� conjugate� numerator�denominator��selfs r �test_intzTestNumbers.test_int s� � ����
�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�.�.�/r c � � | j t t t � � | j t t t � � | j t t t � � | j t t t � � | j t t t � � | j dt d� j � | j dt d� j � | j dt d� j � � | j dt d� j � � y )Ng333333@r g333333�)
�assertFalser"