| Server IP : 3.111.61.48 / Your IP : 216.73.216.67 Web Server : Apache System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.2.31 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3.10/test/__pycache__/ |
Upload File : |
o
�9j�v � @ s� d Z ddlmZ ddlmZ ddlZddlZddlZddlZddl Z ddl
Z
ddlZddlmZm
Z
ddlmZmZ ejZG dd� de�ZG d d
� d
e�ZG dd� dej�Zd
d� ZG dd� dej�Zedkrme�� dS dS )zTests for Lib/fractions.py.� )�Decimal)�requires_IEEE_754N)�copy�deepcopy)�dumps�loadsc @ s\ e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zdd� ZeZ
dS )�
DummyFloatz8Dummy float class for testing comparisons with Fractionsc C s t |t�s td��|| _d S )Nz-DummyFloat can only be initialized from float)�
isinstance�float� TypeError�value��selfr � r �*/usr/lib/python3.10/test/test_fractions.py�__init__ s
zDummyFloat.__init__c C s: t |tj�r|t�| j�|�S t |t�r|| j|j�S tS �N)r �numbers�Rational�F�
from_floatr r �NotImplemented)r �other�opr r r �_richcmp s
zDummyFloat._richcmpc C � | � |tj�S r )r �operator�eq�r r r r r �__eq__! � zDummyFloat.__eq__c C r r )r r �ler r r r �__le__"