o
    KXh                     @   sN   d dl Z d dlmZmZ G dd dZG dd deeZG dd deeZdS )	    N)PyTestCTestc                   @   s,   e Zd Zdd Zdd Zdd Zdd Zd	S )
	TestFloatc                 C   sT   dt jt jd t jd dfD ]}| t| || | | | || qd S )NgAd   ig@)mathpiassertEqualfloatdumpsloadsselfnum r   C/opt/python-3.10.19/usr/lib/python3.10/test/test_json/test_float.pytest_floats   s    zTestFloat.test_floatsc                 C   s:   dD ]}|  | |t| |  t| || qd S )N)   l        l            )r   r
   strintr   r   r   r   	test_ints   s   zTestFloat.test_intsc                 C   s4   |  | dtdg |  | dtdg d S )Nz[23456789012E666]infz[-23456789012E666]-inf)r   r   r	   )r   r   r   r   test_out_of_range   s   zTestFloat.test_out_of_rangec                 C   s   t dt dt dfD ]9}| |g}||kr"| | ||g n| |}| t|d | |d |d  | jt| j|gdd qd S )Nr   r   nanr   r   F)Z	allow_nan)r	   r
   r   r   lenZassertNotEqualZassertRaises
ValueError)r   valoutresr   r   r   test_allow_nan   s   
zTestFloat.test_allow_nanN)__name__
__module____qualname__r   r   r   r   r   r   r   r   r      s
    r   c                   @      e Zd ZdS )TestPyFloatNr    r!   r"   r   r   r   r   r$           r$   c                   @   r#   )
TestCFloatNr%   r   r   r   r   r'   !   r&   r'   )r   Ztest.test_jsonr   r   r   r$   r'   r   r   r   r   <module>   s
    