HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/test/test_json/__pycache__/test_unicode.cpython-310.opt-1.pyc
o

�i$�@sZddlZddlmZddlmZmZGdd�d�ZGdd�dee�ZGdd	�d	ee�ZdS)
�N)�OrderedDict)�PyTest�CTestc@sdeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�TestUnicodecCsd}|�|�}|�|d�dS)N�αΩz"\u03b1\u03a9"��dumps�assertEqual��self�u�j�r�8/usr/local/lib/python3.10/test/test_json/test_unicode.py�test_encoding3
s
zTestUnicode.test_encoding3cCs d}|�|g�}|�|d�dS)Nrz["\u03b1\u03a9"]rr
rrr�test_encoding4szTestUnicode.test_encoding4cCs(d}|j|dd�}|�|d�|��dS)NrF�Zensure_asciiz"{0}"�rr	�formatr
rrr�test_encoding5szTestUnicode.test_encoding5cCs*d}|j|gdd�}|�|d�|��dS)NrFrz["{0}"]rr
rrr�test_encoding6szTestUnicode.test_encoding6cCs0d}|�|�|�d�|�|j|dd�d�dS)Nu𝄠z"\ud834\udd20"Fru"𝄠")r	r�rrrrr�test_big_unicode_encodesz#TestUnicode.test_big_unicode_encodecCs4d}|�|�d|d�|�|�|�d�|�dS)Nuz𝄠x�"z"z\ud834\udd20x")r	�loadsrrrr�test_big_unicode_decode#sz#TestUnicode.test_big_unicode_decodecCs8tdd�D]}t|�}d�|�}|�|�|�|�qdS)Nri��z"\u{0:04x}")�range�chrrr	r)r�ir�srrr�test_unicode_decode(s

�zTestUnicode.test_unicode_decodecCsJ|�t|�d��t�|�t|�d��t�|�t|�d�d�t�dS)Nz""z"a"z["a"]r)r	�typer�str�rrrr�test_unicode_preservation.sz%TestUnicode.test_unicode_preservationcCs&|�t|jd�|�t|jdg�dS)Nshi)�assertRaises�	TypeErrorrr#rrr�test_bytes_encode3szTestUnicode.test_bytes_encodecCs�dtjfdtjfdtjfdtjfdtjffD]#\}}dg}|�|��|�}|�|�	||�|�|�|�	|�|�q|�
t|j	d�|�|�	d�d	��d
�|�|�	d�d�|�|�	d
�d�|�|�	d�d�dS)Nzutf-8zutf-16bezutf-16lezutf-32bezutf-32leu
aµ€𝄠s["�"]u"☀"z	utf-16-leu☀s5�s7�s57�9)�codecs�BOM_UTF8�BOM_UTF16_BE�BOM_UTF16_LE�BOM_UTF32_BE�BOM_UTF32_LEr�encoder	rr%�UnicodeDecodeError)r�encodingZbom�data�encodedrrr�test_bytes_decode7s"��zTestUnicode.test_bytes_decodecCs�d}gd�}|�|�|�t|��|�|j|dd�d�|�|j|td�}|�|t|��|�t|�t�|�|j|tdd�d�t|��dS)Nz?{"xkd":1, "kcw":2, "art":3, "hxm":4, "qrt":5, "pad":6, "hoy":7}))Zxkd�)Zkcw�)Zart�)Zhxm�)Zqrtr()Zpad�)Zhoyr)cSs|S�Nr��xrrr�<lambda>W�zATestUnicode.test_object_pairs_hook_with_unicode.<locals>.<lambda>)�object_pairs_hookcSsdSr<rr=rrrr?]r@)rAZobject_hook)r	r�evalrr!)rr�pZodrrr�#test_object_pairs_hook_with_unicodeRs��z/TestUnicode.test_object_pairs_hook_with_unicodeN)�__name__�
__module__�__qualname__rrrrrrr r$r'r6rDrrrrrsrc@�eZdZdS)�
TestPyUnicodeN�rErFrGrrrrrIa�rIc@rH)�TestCUnicodeNrJrrrrrLbrKrL)	r+�collectionsrZtest.test_jsonrrrrIrLrrrr�<module>s[