o
    TÃió  ã                   @   sT   d dl Z d dlmZ d dlmZmZ d dlZd dlm	Z	m
Z
mZ G dd„ deƒZdS )é    N)ÚTestCase)Ú	long_typeÚ	text_type)ÚNaNÚPosInfÚNegInfc                   @   s$   e Zd Zdd„ Zdd„ Zdd„ ZdS )Ú	TestFloatc                 C   s,   t ttfD ]}|  t t |¡¡d ¡ qd S )N)r   r   r   ÚassertEqualÚjsonÚloadsÚ	dumpsJSON)ÚselfÚf© r   úJ/home/ubuntu/.local/lib/python3.10/site-packages/hjson/tests/test_float.pyÚtest_degenerates_ignore	   s   ÿz!TestFloat.test_degenerates_ignorec              	   C   sp   dt jt jd t jd dfD ]'}|  tt |¡ƒ|¡ |  t t |¡¡|¡ |  t tt |¡ƒ¡|¡ qd S )NgÃõðŠûØAéd   iœÿÿÿgÍÌÌÌÌÌ@)ÚmathÚpir	   Úfloatr
   r   r   r   ©r   Únumr   r   r   Útest_floats   s   
ÿüzTestFloat.test_floatsc              	   C   sz   dt dƒddfD ]2}|  t |¡t|ƒ¡ |  tt |¡ƒ|¡ |  t t |¡¡|¡ |  t tt |¡ƒ¡|¡ qd S )Né   l        l            )r   r	   r
   r   ÚstrÚintr   r   r   r   r   r   Ú	test_ints   s   üzTestFloat.test_intsN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r   r      s    r   )r   Úunittestr   Úhjson.compatr   r   Úhjsonr
   Úhjson.decoderr   r   r   r   r   r   r   r   Ú<module>   s    