| Server IP : 3.111.61.48 / Your IP : 216.73.216.67 Web Server : Apache System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.2.31 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3.10/test/__pycache__/ |
Upload File : |
o
�9j') � @ s� d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z m
Z
ddlmZ ej
dkZdZej
dkZG d d
� d
ej�ZedkrIe�� dS dS )z9
Test the implementation of the PEP 540: the UTF-8 Mode.
� N)�support)�assert_python_ok�assert_python_failure)� os_helper�win32)�C�POSIX�vxworksc @ s� e Zd Zdddd�Zdd� Zdd�dd �Ze�ed
�dd� �Z d
d� Z
dd� Zdd� Zdd� Z
dd� Zd*dd�Zdd� Zdd� Zdd� Zd d!� Ze�ed"�d#d$� �Zd%d&� Ze�ed'�d(d)� �ZdS )+�
UTF8ModeTests� �0)�
PYTHONUTF8�PYTHONLEGACYWINDOWSFSENCODING�PYTHONCOERCECLOCALEc C s t �t jd �}|tv S )N)�locale� setlocale�LC_CTYPE�
POSIX_LOCALES)�self�loc� r �*/usr/lib/python3.10/test/test_utf8_mode.py�posix_locale s zUTF8ModeTests.posix_localeF)�failurec O sR t | jfi |��}|rt|i |��}|d }nt|i |��}|d }|�� �d�S )N� � z
)�dict�DEFAULT_ENVr r �decode�rstrip)r r �args�kw�outr r r �
get_output s
zUTF8ModeTests.get_outputzWindows has no POSIX localec C sZ d}t D ]&}| j|d�� | jd||d�}| �|d� W d � n1 s%w Y qd S )N�&import sys; print(sys.flags.utf8_mode)��LC_ALL�-c�1)r �subTestr# �assertEqual)r �coder r"