| Server IP : 121.121.20.254 / Your IP : 216.73.217.51 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/test/support/__pycache__/ |
Upload File : |
�
���g. � �, � d dl Z d dlZd dlZd dlZd dlmZ d dlmZmZm Z d dl
mZ ee� dz dz dz Z e j de j � Z e j d � Zd
d�d�Zd
� Zd� Z e � G d� dej( � � Zd� Zy)� N)�Path)� REPO_ROOT�
TEST_HOME_DIR�requires_subprocess)�skip_if_missing�Tools�i18nzpygettext.pyz)msgid(.*?)(?:msgid_plural|msgctxt|msgstr)z"((?:\\"|[^"])*)"T��stdout_onlyc � � t j t j t ddd| gt j
t j
d�� }|r|j S |S )Nz
--no-locationz-o�-T)�stdout�stderr�text)�
subprocess�run�sys�
executable� pygettext�PIPEr )�pathr �ress �-C:\Python312\\Lib\test\support\i18n_helper.py�_generate_po_filer sJ � �
�.�.�#�.�.�)�)�4��d�<� *���
���"�$�C� ��z�z���J� c �� � g }t j | � D ]L }dj t j |� � }|j dd� }|s�<|j |� �N t
|� S )N� z\"�")�
msgid_pattern�findall�join�msgid_string_pattern�replace�append�sorted)�po�msgids�msgid�msgid_strings r �_extract_msgidsr* sc � �
�F��&�&�r�*���w�w�3�;�;�E�B�C��#�+�+�E�3�7����M�M�,�'� +�
�&�>�r c �2 � t t � dz | z dz S )N�translationdataz
msgids.txt)r r )�module_names r �_get_snapshot_pathr. % s � ��
��!2�2�[�@�<�O�Or c � � e Zd Zd� Zy)�TestTranslationsBasec �l � t d� t |j d�� }| j |j d� | j |j
d� t
|j � }t |j � }|j � j � }| j ||� y)zTAssert that msgids extracted from a given module match a
snapshot.
r Fr
r r N)
r r �__file__�assertEqual�
returncoder r* r r. �__name__� read_text�
splitlines�assertListEqual)�self�moduler r'