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.7/test/test_json/__pycache__/test_unicode.cpython-37.opt-1.pyc
B

��g$�@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)NuαΩz"\u03b1\u03a9")�dumps�assertEqual)�self�u�j�r�7/usr/local/lib/python3.7/test/test_json/test_unicode.py�test_encoding3
s
zTestUnicode.test_encoding3cCs d}|�|g�}|�|d�dS)NuαΩz["\u03b1\u03a9"])rr)rr	r
rrr�test_encoding4szTestUnicode.test_encoding4cCs(d}|j|dd�}|�|d�|��dS)NuαΩF)�ensure_asciiz"{0}")rr�format)rr	r
rrr�test_encoding5szTestUnicode.test_encoding5cCs*d}|j|gdd�}|�|d�|��dS)NuαΩF)rz["{0}"])rrr)rr	r
rrr�test_encoding6szTestUnicode.test_encoding6cCs0d}|�|�|�d�|�|j|dd�d�dS)Nu𝄠z"\ud834\udd20"F)ru"𝄠")rr)rr	rrr�test_big_unicode_encodesz#TestUnicode.test_big_unicode_encodecCs4d}|�|�d|d�|�|�|�d�|�dS)Nuz𝄠x�"z"z\ud834\udd20x")r�loads)rr	rrr�test_big_unicode_decode#sz#TestUnicode.test_big_unicode_decodecCs<x6tdd�D](}t|�}d�|�}|�|�|�|�qWdS)Nri��z"\u{0:04x}")�range�chrrrr)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�	TypeErrorr)rrrr�test_bytes_encode3szTestUnicode.test_bytes_encodecCs�xvdtjfdtjfdtjfdtjfdtjfgD]F\}}dg}|�|��|�}|�|�	||�|�|�|�	|�|�q.W|�
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�encoderrr�UnicodeDecodeError)r�encodingZbom�dataZencodedrrr�test_bytes_decode7s zTestUnicode.test_bytes_decodecCs�d}dddddddg}|�|�|�t|��|�|j|d	d
�d�|�|j|td�}|�|t|��|�t|�t�|�|j|tdd
�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_hookcSsdS)Nr)r5rrrr6]r7)r8Zobject_hook)rr�evalrr)rr�pZodrrr�#test_object_pairs_hook_with_unicodeRs

z/TestUnicode.test_object_pairs_hook_with_unicodeN)�__name__�
__module__�__qualname__r
rrrrrrrr!r/r;rrrrrsrc@seZdZdS)�
TestPyUnicodeN)r<r=r>rrrrr?asr?c@seZdZdS)�TestCUnicodeN)r<r=r>rrrrr@bsr@)	r%�collectionsrZtest.test_jsonrrrr?r@rrrr�<module>s
[