Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/test/test_json/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/test/test_json/__pycache__/test_unicode.cpython-35.opt-1.pyc



��Yf^�@soddlmZddlmZmZGdd�d�ZGdd�dee�ZGdd�dee�Zd	S)
�)�OrderedDict)�PyTest�CTestc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�TestUnicodecCs)d}|j|�}|j|d�dS)NuαΩz"\u03b1\u03a9")�dumps�assertEqual)�self�u�j�r�@/opt/alt/python35/lib64/python3.5/test/test_json/test_unicode.py�test_encoding3	szTestUnicode.test_encoding3cCs,d}|j|g�}|j|d�dS)NuαΩz["\u03b1\u03a9"])rr)rr	r
rrr�test_encoding4szTestUnicode.test_encoding4cCs8d}|j|dd�}|j|dj|��dS)NuαΩ�ensure_asciiFz"{0}")rr�format)rr	r
rrr�test_encoding5szTestUnicode.test_encoding5cCs;d}|j|gdd�}|j|dj|��dS)NuαΩrFz["{0}"])rrr)rr	r
rrr�test_encoding6szTestUnicode.test_encoding6cCsBd}|j|j|�d�|j|j|dd�d�dS)Nu𝄠z"\ud834\udd20"rFu"𝄠")rr)rr	rrr�test_big_unicode_encodesz#TestUnicode.test_big_unicode_encodecCsDd}|j|jd|d�|�|j|jd�|�dS)Nuz𝄠x�"z"z\ud834\udd20x")r�loads)rr	rrr�test_big_unicode_decode"s!z#TestUnicode.test_big_unicode_decodecCsRxKtdd�D]:}t|�}dj|�}|j|j|�|�qWdS)Nri��z"\u{0:04x}")�range�chrrrr)r�ir	�srrr�test_unicode_decode'szTestUnicode.test_unicode_decodecCse|jt|jd��t�|jt|jd��t�|jt|jd�d�t�dS)Nz""z"a"z["a"]r)r�typer�str)rrrr�test_unicode_preservation-sz%TestUnicode.test_unicode_preservationcCs3|jt|jd�|jt|jdg�dS)Nshi)�assertRaises�	TypeErrorr)rrrr�test_bytes_encode2szTestUnicode.test_bytes_encodecCs0|jt|jd�|jt|jd�dS)Ns"hi"s["hi"])rr r)rrrr�test_bytes_decode6szTestUnicode.test_bytes_decodecCs�d}dddddddg}|j|j|�t|��|j|j|ddd��|�|j|dt�}|j|t|��|jt|�t�|j|j|dtddd��t|��dS)Nz?{"xkd":1, "kcw":2, "art":3, "hxm":4, "qrt":5, "pad":6, "hoy":7}�xkd��kcw��art��hxm��qrt��pad��hoy�Zobject_pairs_hookcSs|S)Nr)�xrrr�<lambda>@szATestUnicode.test_object_pairs_hook_with_unicode.<locals>.<lambda>Zobject_hookcSsdS)Nr)r1rrrr2Fs)r#r$)r%r&)r'r()r)r*)r+r,)r-r.)r/r0)rr�evalrr)rr�pZodrrr�#test_object_pairs_hook_with_unicode;s%z/TestUnicode.test_object_pairs_hook_with_unicodeN)�__name__�
__module__�__qualname__r
rrrrrrrr!r"r5rrrrrsrc@seZdZdS)�
TestPyUnicodeN)r6r7r8rrrrr9Jsr9c@seZdZdS)�TestCUnicodeN)r6r7r8rrrrr:Ksr:N)�collectionsrZtest.test_jsonrrrr9r:rrrr�<module>sE