| Current Path : /usr/local/lib/python3.11/test/__pycache__/ |
| Current File : //usr/local/lib/python3.11/test/__pycache__/test_abstract_numbers.cpython-311.pyc |
�
SԚg@ � �� � d Z ddlZddlZddlZddlZddlmZmZmZm Z m
Z
d� Z G d� dej � � Z
G d� dej � � Zed k r ej � � dS dS )
zUnit tests for numbers.py.� N)�Complex�Real�Rational�Integral�Numberc �� � d� }t | � � D ];} t | |� � }|j rt | ||� � �,# t $ r Y �8w xY wt j | � � | S )Nc � � t � � ��N)�NotImplementedError)�args�kwargss �7/usr/local/lib/python3.11/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
s� � �$� $� $� �C��� � �� ��C��&�&�E��)�
4���T�?�3�3�3���� � � ��D� ������s�#�#�#��Js �(?�
A�Ac � � e Zd Zd� Zd� Zd� ZdS )�TestNumbersc �� � | � t t t � � � � | � t t t � � � � | � t t t
� � � � | � t t t � � � � | � t t t � � � � | � dt d� � j � � | � dt d� � j
� � | � dt d� � � � � � � | � dt d� � � � � � � | � dt d� � j � � | � dt d� � j
� � d S )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�1�2�2�2����
�3��1�1�2�2�2����
�3��-�-�.�.�.����
�3��0�0�1�1�1����
�3��/�/�0�0�0�����C��F�F�K�(�(�(�����C��F�F�K�(�(�(�����C��F�F�,�,�.�.�/�/�/�����S��W�W�.�.�0�0�1�1�1�����C��F�F�,�-�-�-�����C��F�F�.�/�/�/�/�/r c �< � | � t t t � � � � | � t t t � � � � | � t t t � � � � | � t t t � � � � | � t t t � � � � | � dt d� � j
� � | � dt d� � j � � | � dt d� � � � � � � | � dt d� � � � � � � d S )Ng333333@r g333333�)
�assertFalser"