HEX
Server: Apache
System: Linux bd12.noc223.com 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: handcraf (1693)
PHP: 8.1.28
Disabled: NONE
Upload Files
File: //opt/alt/python312/lib64/python3.12/test/test_json/__pycache__/test_unicode.cpython-312.opt-1.pyc
�

h�e$��l�ddlZddlmZddlmZmZGd�d�ZGd�dee�ZGd�d	ee�Zy)
�N)�OrderedDict)�PyTest�CTestc�N�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
y)
�TestUnicodec�N�d}|j|�}|j|d�y)N�αΩz"\u03b1\u03a9"��dumps�assertEqual��self�u�js   �B/opt/alt/python312/lib64/python3.12/test/test_json/test_unicode.py�test_encoding3zTestUnicode.test_encoding3
s%��H���J�J�q�M������.�/�c�P�d}|j|g�}|j|d�y)Nr	z["\u03b1\u03a9"]r
r
s   r�test_encoding4zTestUnicode.test_encoding4s'��H���J�J��s�O������0�1rc�p�d}|j|d��}|j|dj|��y)Nr	F��ensure_asciiz"{0}"�rr�formatr
s   r�test_encoding5zTestUnicode.test_encoding5s2��H���J�J�q�u�J�-������G�N�N�1�-�.rc�r�d}|j|gd��}|j|dj|��y)Nr	Frz["{0}"]rr
s   r�test_encoding6zTestUnicode.test_encoding6s6��H���J�J��s��J�/������I�,�,�Q�/�0rc��d}|j|j|�d�|j|j|d��d�y)Nu𝄠z"\ud834\udd20"Fru"𝄠")rr�rrs  r�test_big_unicode_encodez#TestUnicode.test_big_unicode_encodes=����������A��(:�;�������A�E��:�N�Krc��d}|j|jd|zdz�|�|j|jd�|�y)Nuz𝄠x�"z"z\ud834\udd20x")r�loadsrs  r�test_big_unicode_decodez#TestUnicode.test_big_unicode_decode#sB����������C�!�G�c�M�2�A�6�������$8�9�1�=rc��tdd�D]?}t|�}dj|�}|j|j	|�|��Ay)Nri��z"\u{0:04x}")�range�chrrrr#)r�ir�ss    r�test_unicode_decodezTestUnicode.test_unicode_decode(sI���q�&�!�	/�A��A��A��%�%�a�(�A����T�Z�Z��]�A�.�	/rc��|jt|jd��t�|jt|jd��t�|jt|jd�d�t�y)Nz""z"a"z["a"]r)r�typer#�str�rs r�test_unicode_preservationz%TestUnicode.test_unicode_preservation.sa������d�j�j��.�/��5�����d�j�j��/�0�#�6�����d�j�j��1�!�4�5�s�;rc��|jt|jd�|jt|jdg�y)Nshi)�assertRaises�	TypeErrorrr.s r�test_bytes_encodezTestUnicode.test_bytes_encode3s0�����)�T�Z�Z��7����)�T�Z�Z�%��9rc��dtjfdtjfdtjfdtjfdtj
ffD]m\}}dg}|j
|�j|�}|j|j||z�|�|j|j|�|��o|jt|jd�|j|jdjd	��d
�|j|jd�d�|j|jd
�d�|j|jd�d�y)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r#r1�UnicodeDecodeError)r�encoding�bom�data�encodeds     r�test_bytes_decodezTestUnicode.test_bytes_decode7sC���&�/�/�*��V�0�0�1��V�0�0�1��V�0�0�1��V�0�0�1��
	8�M�H�c�,�,�D��j�j��&�-�-�h�7�G����T�Z�Z��g�
�6��=����T�Z�Z��0�$�7�
	8�	
���,�d�j�j�+�F�
	
������J�$5�$5�k�$B�C�!�	#�	
������H�-�q�1�������H�-�q�1�������E�*�B�/rc��d}gd�}|j|j|�t|��|j|j|d���|�|j|t��}|j|t|��|jt	|�t�|j|j|td���t|��y)Nz?{"xkd":1, "kcw":2, "art":3, "hxm":4, "qrt":5, "pad":6, "hoy":7}))�xkd�)�kcw�)�art�)�hxm�)�qrtr5)�pad�)�hoyr6c��|S�N���xs r�<lambda>zATestUnicode.test_object_pairs_hook_with_unicode.<locals>.<lambda>Ws��Q�r)�object_pairs_hookc��yrSrTrUs rrWzATestUnicode.test_object_pairs_hook_with_unicode.<locals>.<lambda>]s�r)rX�object_hook)rr#�evalrr,)rr)�p�ods    r�#test_object_pairs_hook_with_unicodez/TestUnicode.test_object_pairs_hook_with_unicodeRs���M��
1��������A���Q��0�������A�;��G��K�
�Z�Z��{�Z�
;������[��^�,�����b��;�/�������A�;�2@�$�B�$�Q��	)rN)�__name__�
__module__�__qualname__rrrrr r$r*r/r3rDr^rTrrrrs:��0�
2�
/�
1�
L�
>�
/�<�
:�0�6)rrc��eZdZy)�
TestPyUnicodeN�r_r`rarTrrrcrca��rrcc��eZdZy)�TestCUnicodeNrdrTrrrgrgbrerrg)	r8�collectionsr�test.test_jsonrrrrcrgrTrr�<module>rjs1��
�#�(�X)�X)�v/�K��.�,�;��,r