Yohohohohohooho | Sanrei Aya
Sanrei Aya


Server : LiteSpeed
System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : elvh3918 ( 1528)
PHP Version : 8.2.31
Disable Function : mail
Directory :  /lib64/python3.9/site-packages/simplejson/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python3.9/site-packages/simplejson/tests/__pycache__/test_decimal.cpython-39.pyc
a

\Փa�	�@sLddlZddlmaddlmZddlmZmZddlZGdd�de�Z	dS)�N)�Decimal)�TestCase)�StringIO�
reload_modulec@sPeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�ZdS)�TestDecimal)z1.0z10.00�1.1z1234567890.1234567890�500cKs@t�}tj||fi|��tj|fi|��}|�||���|S�N)r�json�dump�dumps�assertEqual�getvalue)�self�obj�kw�sio�res�r�C/usr/lib64/python3.9/site-packages/simplejson/tests/test_decimal.pyr
s
zTestDecimal.dumpscKs8t|�}tj|fi|��}|�|tj|fi|���|Sr	)rr
�loadsr
�load)r�srrrrrrrszTestDecimal.loadscCs0tt|j�D]}|�|j|dd�t|��qdS)NT�Zuse_decimal)�mapr�NUMSr
r�str)r�drrr�test_decimal_encodeszTestDecimal.test_decimal_encodecCs*|jD]}|�|j|td�t|��qdS)N�Zparse_float)rr
rr)rrrrr�test_decimal_decodes
zTestDecimal.test_decimal_decodecCsFtt|j�D]4}||i}|�|j|j|dd�td�t|�|i�qdS)NTrr)rrrr
rrr�rr�vrrr�test_stringify_keys�
�zTestDecimal.test_stringify_keyc	CsLtt|j�D]:}||gd|ifD]$}|�|j|j|dd�td�|�q qdS)N�Trr)rrrr
rrr!rrr�test_decimal_roundtrip's��z"TestDecimal.test_decimal_roundtripcCs�td�}|jttj|dd�|�dt�|��|�dtj|dd��|jttj|t�dd�t�}t�||�|�d|���t�}tj||dd�|�d|���dS)NrFrT)	rZassertRaises�	TypeErrorr
rr
rrr)rrrrrr�test_decimal_defaults1s�z!TestDecimal.test_decimal_defaultscCs&tt�jaddl}t|j_|��dS)Nr)r�decimalrZsimplejson.encoder�encoderr%)r�
simplejsonrrr�test_decimal_reload@s
zTestDecimal.test_decimal_reloadN)�__name__�
__module__�__qualname__rrrrr r#r%r'r+rrrrrs
r)
r(rZunittestrZsimplejson.compatrrr*r
rrrrr�<module>s


Yohohohohohooho | Sanrei Aya