관리-도구
편집 파일: test_float.cpython-311.pyc
� �܋f� � �b � d dl Z d dlmZ d dlmZmZ d dlZd dlm Z m Z mZ G d� de� � ZdS )� N)�TestCase)� long_type� text_type)�NaN�PosInf�NegInfc �, � e Zd Zd� Zd� Zd� Zd� Zd� ZdS )� TestFloatc �: � t t fD ]@}| � t j t j |d�� � d�� � |� � �At j t j t d�� � d�� � }| � d|z |k � � d S )NT�� allow_nanr )r r �assertEqual�json�loads�dumpsr � assertTrue)�self�inf�nans �n/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/simplejson/tests/test_float.py�test_degenerates_allowz TestFloat.test_degenerates_allow s� � ��F�#� _� _�C����T�Z�� �3�$�(G�(G�(G�SW�X�X�X�Z]�^�^�^�^��j���C�4�8�8�8�D�I�I�I������S��S�(�)�)�)�)�)� c � � t t t fD ]>}| � t j t j |d�� � � � d � � �?d S )NT)� ignore_nan)r r r r r r r )r �fs r �test_degenerates_ignorez!TestFloat.test_degenerates_ignore sX � ��&�#�&� O� O�A����T�Z�� �1��(F�(F�(F�G�G��N�N�N�N� O� Or c �* � t t t fD ]*}| � t t j |d�� � �+dD ]P}| � t t j |d�� � | � t t j |� � �Qd S )NFr )�Infinityz -Infinityr )r r r �assertRaises� ValueErrorr r r )r r �ss r �test_degenerates_denyzTestFloat.test_degenerates_deny s� � ��&�#�&� J� J�A����j�$�*�a�5��I�I�I�I�1� 9� 9�A����j�$�*�a�5��I�I�I����j�$�*�a�8�8�8�8� 9� 9r c �� � dt j t j dz t j dz dfD ]�}| � t t j |� � � � |� � | � t j t j |� � � � |� � | � t j t t j |� � � � � � |� � ��d S )Ng���A�d i����g������@)�math�pir �floatr r r r �r �nums r �test_floatszTestFloat.test_floats s� � �&�����#���G�T�M�3�(� J� J�C����U�4�:�c�?�?�3�3�S�9�9�9����T�Z�� �3���8�8�#�>�>�>����T�Z� �$�*�S�/�/�(B�(B�C�C�S�I�I�I�I� J� Jr c � � dt d� � ddfD ]�}| � t j |� � t |� � � � | � t t j |� � � � |� � | � t j t j |� � � � |� � | � t j t t j |� � � � � � |� � ��d S )N� l l )r r r r �str�intr r r( s r � test_intszTestFloat.test_ints! s� � ��y��|�|�U�E�2� J� J�C����T�Z��_�_�c�#�h�h�7�7�7����S���C���1�1�3�7�7�7����T�Z�� �3���8�8�#�>�>�>����T�Z� �$�*�S�/�/�(B�(B�C�C�S�I�I�I�I� J� Jr N)�__name__� __module__�__qualname__r r r"