| Server IP : 118.27.122.248 / Your IP : 216.73.217.130 Web Server : Apache System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64 User : c9415830 ( 11735) PHP Version : 8.4.17 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python36/lib64/python3.6/test/__pycache__/ |
Upload File : |
3
x2_� � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
mZmZ dd� Z
eje
� dd� ZG dd � d e�ZG d
d� dejejejej�ZG dd
� d
ej�ZG dd� dej�Zedkr�ej� dS )z� Test script for the Unicode implementation.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
� N)�support�string_testsc C sX ddd�}d
dd�}ddd�}ddd �}| d
kr<||d d fS | dkrP||d d fS d S d S )N�strictc S s dS )N�* � )�input�errorsr r �6/opt/alt/python36/lib64/python3.6/test/test_unicode.py�decode1 s z search_function.<locals>.decode1c S s dS )Nr r )r r r r r �encode1 s z search_function.<locals>.encode1c S s dS )Nr )r r r )r r r r r �encode2 s z search_function.<locals>.encode2c S s dS )Nr )r r r )r r r r r �decode2 s z search_function.<locals>.decode2z
test.unicode1z
test.unicode2)r )r )r )r r )�encodingr
r r r
r r r �search_function s
r c C s | j � j� S )z�
Try to get a fresh clone of the specified text:
new object with a reference count of 1.
This is a best-effort: latin1 single letters and the empty
string ('') are singletons and cannot be cloned.
)�encode�decode)�textr r r �duplicate_string% s r c @ s e Zd ZdS )�StrSubclassN)�__name__�
__module__�__qualname__r r r r r / s r c sx e Zd ZeZdd� Zdd� Zdd� Zdd� Zd d
� Z dd� Z
d
d� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd � Zejejd�kd#�d$d%� �Zd&d'� Zejd(d)� �Zd*d+� Zd,d-� Z� fd.d/�Z � fd0d1�Z!� fd2d3�Z"� fd4d5�Z#� fd6d7�Z$� fd8d9�Z%d:d;� Z&� fd<d=�Z'd>d?� Z(d@dA� Z)dBdC� Z*dDdE� Z+dFdG� Z,dHdI� Z-dJdK� Z.dLdM� Z/� fdNdO�Z0dPdQ� Z1dRdS� Z2ej3ejd�kdV�ejdWdX� ��Z4dYdZ� Z5d[d\� Z6d]d^� Z7d_d`� Z8dadb� Z9dcdd� Z:dedf� Z;dgdh� Z<didj� Z=dkdl� Z>dmdn� Z?dodp� Z@ejdqdr� �ZAdsdt� ZBdudv� ZCejDdwdxdy�dzd{� �ZEd|d}� ZFd~d� ZGd�d�� ZHd�d�� ZId�d�� ZJd�d�� ZKd�d�� ZLd�d�� ZMd�d�� ZNd�d�� ZOd�d�� ZPd�d�� ZQd�d�� ZRd�d�� ZSd�d�� ZTd�d�� ZUd�d�� ZVd�d�� ZWd�d�� ZXd�d�� ZYd�d�� ZZd�d�� Z[d�d�� Z\d�d�� Z]d�d�� Z^ejejd�k�pe_j`d��d�kd��d�d�� �Zaejd�d�� �Zbd�d�� Zcd�d�� Zdd�d�� Zed�d�� Zfd�d�� Zgd�d�� Zhd�d Zi� ZjS )��UnicodeTestc G s� t ||�}||� }| j||� | jt|�t|�k� ||kr�G dd� dt�}||�}t ||�}||� }| j||� | j||k � d S )Nc @ s e Zd Zdd� ZdS )z)UnicodeTest.checkequalnofix.<locals>.usubc S s dt j| � S )Nzusub(%r))�str�__repr__)�selfr r r r C s z2UnicodeTest.checkequalnofix.<locals>.usub.__repr__N)r r r r r r r r �usubB s r )�getattr�assertEqual�
assertTrue�typer )r �result�objectZ
methodname�args�methodZ
realresultr r r r �checkequalnofix9 s
zUnicodeTest.checkequalnofixc C sV | j dd� | j dd� | jttd� | jttd� | jttdd � | jdd� d S ) N� ÿu z'\Ufffffffe'z'\Uffffffff'z'\U%08x'i z\u0020� )r �assertRaises�SyntaxError�eval�assertNotEqual)r r r r �
test_literalsK s zUnicodeTest.test_literalsc C sT t jjd��sP| jtd�d� | jtd�d� | jtd�d� | jtd�d � | jtd
�d� | jtd�d
� | jtd�d� | jtd�d� | jtd�d� | jtd�d� | jtd�d� | jtd�d� | jtd�d� d}tdjtttd����}| j||� | jtdd dd �tdd dd �� G d!d"� d"�}| j t
t|� � d S )#N�java�abcz'abc'zab\cz'ab\\c'zab\z'ab\\'z\cz'\\c'�\z'\\'�
z'\n'�
z'\r'� z'\t'�z'\x08'z'"z'\'"'�'z"'"�"z'"'a� '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'� � u 𐀀�'