관리-도구
편집 파일: test_decimal.cpython-311.pyc
� �܋f� � �Z � d dl Z d dl ma d dlmZ d dlmZmZ d dlZ G d� de� � Z dS )� N)�Decimal)�TestCase)�StringIO� reload_modulec �B � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd S )�TestDecimal)z1.0z10.00�1.1z1234567890.1234567890�500c � � t � � }t j ||fi |�� t j |fi |��}| � ||� � � � � |S �N)r �json�dump�dumps�assertEqual�getvalue)�self�obj�kw�sio�ress �p/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/simplejson/tests/test_decimal.pyr zTestDecimal.dumps s_ � ��j�j��� �#�s�!�!�b�!�!�!��j��#�#��#�#������c�l�l�n�n�-�-�-�� � c � � t |� � }t j |fi |��}| � |t j |fi |��� � |S r )r r �loadsr �load)r �sr r r s r r zTestDecimal.loads sQ � ��q�k�k���j��!�!�b�!�!������d�i��2�2�r�2�2�3�3�3�� r c � � t t | j � � D ]:}| � | � |d�� � t |� � � � �;d S )NT��use_decimal)�mapr �NUMSr r �str)r �ds r �test_decimal_encodezTestDecimal.test_decimal_encode sZ � ��W�d�i�(�(� F� F�A����T�Z�Z��t�Z�<�<�c�!�f�f�E�E�E�E� F� Fr c � � | j D ]?}| � | � |t �� � t |� � � � �@d S )N��parse_float)r! r r r )r r s r �test_decimal_decodezTestDecimal.test_decimal_decode sP � ��� M� M�A����T�Z�Z��w�Z�?�?�����L�L�L�L� M� Mr c �� � t t | j � � D ]Z}||i}| � | � | � |d�� � t �� � t |� � |i� � �[d S )NTr r&