Your IP : 216.73.216.213


Current Path : /opt/alt/python36/lib64/python3.6/test/test_json/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/test/test_json/__pycache__/test_speedups.cpython-36.opt-2.pyc

3

��2a
�@sNddlmZGdd�d�ZGdd�de�ZGdd�de�ZGdd	�d	e�Zd
S)�)�CTestc@seZdZdd�ZdS)�BadBoolcCsdddS)N�r�)�selfrr�2/opt/alt/python36/lib64/python3.6/test_speedups.py�__bool__szBadBool.__bool__N)�__name__�
__module__�__qualname__rrrrrrsrc@seZdZdd�Zdd�ZdS)�TestSpeedupscCs0|j|jjjjd�|j|jjj|jjj�dS)N�_json)�assertEqual�json�decoderZ
scanstringr
�assertIsZc_scanstring)rrrr�test_scanstring
szTestSpeedups.test_scanstringcCs0|j|jjjjd�|j|jjj|jjj�dS)Nr
)rr�encoderZencode_basestring_asciir
rZc_encode_basestring_ascii)rrrr�test_encode_basestring_asciisz)TestSpeedups.test_encode_basestring_asciiN)r	r
rrrrrrrr	src@seZdZdd�Zdd�ZdS)�
TestDecodecCs|jt|jjjd�dS)Nr)�assertRaises�AttributeErrorr�scannerZc_make_scanner)rrrr�test_make_scannerszTestDecode.test_make_scannercs,�fdd�}�jt|d��jt|d�dS)Ncs�jjjt�d�j|�dS)N)�strict)rrZJSONDecoderr�decode)�value)rrr�testsz+TestDecode.test_bad_bool_args.<locals>.testz""z{})r�ZeroDivisionError)rrr)rr�test_bad_bool_argsszTestDecode.test_bad_bool_argsN)r	r
rrrrrrrrsrc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
TestEncodecCs|jt|jjjddd�dS)NTFs�}=NL�y�R���'J}��u)TF)r�	TypeErrorrr�c_make_encoder)rrrr�test_make_encoder!szTestEncode.test_make_encodercCs�dd�}|jjjddd�|dddddd�	}|jt��|dd	�WdQRX|jt��|dd
id	�WdQRXdd�}|jjjdd
d�|dddddd�	}|jt��|dd	�WdQRXdS)NcWsdS)Nr)�argsrrr�bad_encoder1*sz5TestEncode.test_bad_str_encoder.<locals>.bad_encoder1cSst|�S)N)�str)�objrrr�<lambda>,sz1TestEncode.test_bad_str_encoder.<locals>.<lambda>z: z, FZspam��*cWsdddS)Nrrr)r$rrr�bad_encoder24sz5TestEncode.test_bad_str_encoder.<locals>.bad_encoder2cSst|�S)N)r&)r'rrrr(6s)rrr"rr!r)rr%�encr+rrr�test_bad_str_encoder's

zTestEncode.test_bad_str_encodercsV�fdd�}�jt|d��jt|d��jt|d��jt|d��jt|d�dS)Ncs$�jjjf|t�i�jddi�dS)N�ar)rr�JSONEncoderr�encode)�name)rrrr=sz+TestEncode.test_bad_bool_args.<locals>.testZskipkeysZensure_asciiZcheck_circularZ	allow_nan�	sort_keys)rr)rrr)rrr<szTestEncode.test_bad_bool_argscCs6|jt��"|jjjdd�jddd��WdQRXdS)NT)r2rr.)r.r)rr!rrr/r0)rrrr�test_unsortable_keysEszTestEncode.test_unsortable_keysN)r	r
rr#r-rr3rrrrr  s	r N)Ztest.test_jsonrrrrr rrrr�<module>s