B
    18\                 @   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   sX   xRdt jt jd t jd dgD ]2}| t| || | | | || qW d S )NgAd   ig@)mathpiassertEqualfloatdumpsloads)selfnum r   ]/oak/stanford/groups/akundaje/marinovg/programs/Python-3.7.3/Lib/test/test_json/test_float.pytest_floats   s    "zTestFloat.test_floatsc             C   s>   x8dD ]0}|  | |t| |  t| || qW d S )N)   l        l            )r   r
   strint)r   r   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]z-inf)r   r   r	   )r   r   r   r   test_out_of_range   s    zTestFloat.test_out_of_rangec             C   s   xt dt dt dfD ]r}| |g}||krF| | ||g n.| |}| t|d | |d |d  | jt| j|gdd qW d S )Nr   z-infnanr   r   F)	allow_nan)r	   r
   r   r   lenassertNotEqual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               @   s   e Zd ZdS )TestPyFloatN)r!   r"   r#   r   r   r   r   r$       s    r$   c               @   s   e Zd ZdS )
TestCFloatN)r!   r"   r#   r   r   r   r   r%   !   s    r%   )r   Ztest.test_jsonr   r   r   r$   r%   r   r   r   r   <module>   s   