403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.141
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/test_tools/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/test/test_tools/__pycache__/test_msgfmt.cpython-312.opt-2.pyc
�

���g�����	ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
mZddlm
Z
mZe
d�ee�j dzj#�Zee�dzZed	zZd
�ZGd�dej,�ZGd
�dej,�Zd�Zedk(rReej8�dkDr+ej8ddk(re�ej:d�ej<�yy)�N)�GNUTranslations)�Path)�temp_cwd)�assert_python_failure�assert_python_ok)�skip_if_missing�toolsdir�i18n�msgfmt_dataz	msgfmt.pyc�(�ttd||�y)Nz-o)r�msgfmt)�po_file�mo_files  �0C:\Python312\\Lib\test\test_tools\test_msgfmt.py�compile_messagesrs���V�T�7�G�4�c�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�CompilationTestc	�"�d|_t�5tjd�D]�}|j	|��5|jd�}t
|d�5}t|�}ddd�|j}t||�t
|d�5}t|�}ddd�|jjj�ddd���	ddd�y#1swY�{xYw#1swY�OxYw#1swY��xYw#1swYyxYw)N�*.po)r�.mo�rb)�maxDiffr�data_dir�glob�subTest�with_suffix�openr�namer�assertDictEqual�_catalog)�selfrr�f�expected�tmp_mo_file�actuals       r�test_compilationz CompilationTest.test_compilations������
�Z�#�=�=��0���\�\�'�\�2�%�1�1�%�8�G��g�t�,��#2�1�#5��-�#*�,�,�K�$�W�k�:��k�4�0�A�!0��!3��1��(�(����(�:K�:K�L�3�2�1��Z�-�,��
1�0��3�2���Z�sR�+D�C9�C!	�',C9�C-	�.C9�
D�!C*
�&C9�-C6
�2C9�9D�>D�Dc�Z�ttdzd�5}t|�}ddd�|jj	d�d�|j|j	d�d�|j|jdd�d�|j|jdd�d�|j|j	d�d	�|j|j	d
�d�|j|j	d�d
�|j|j
ddd�d�|j|j
ddd�d�|j|jdddd�d�|j|jdddd�d�y#1swY���xYw)Nz
general.mor�foo�bar�baz�abc�xyz�Multilinestring�Multilinetranslationz	"escapes"z"translated"z
 newlines 
z
 translated 
zOne email sent.z%d emails sent.��)rrr�assertEqual�gettext�pgettext�ngettext�	npgettext)r"r#�ts   r�test_translationsz!CompilationTest.test_translations+sv��
�(�\�)�4�
0�A���"�A�1�	
������5�)�5�1�������5�)�5�1�������E�5�1�5�9�������E�5�1�5�9�������#4�5�7M�N�������;�/��@�������#3�4�6H�I�������$5�7H�!�L�*�	,�������$5�7H�!�L�*�	,�������U�,=�%6��;�*�	,�	
������U�,=�%6��;�*�	,�#1�
0�s�F � F*c���t�5td�jd�ttd�}|j
j
d�}|jd|�ddd�y#1swYyxYw)N�
invalid.poz+msgid_plural "plural"
msgstr[0] "singular"
�utf-8z"msgid_plural not preceded by msgid�rr�
write_textrr
�err�decode�assertIn�r"�resr>s   r�test_invalid_msgid_pluralz)CompilationTest.test_invalid_msgid_pluralAsX��
�Z����)�)�+�
�
(���=�C��'�'�.�.��)�C��M�M�>��D��Z�Z���AA,�,A5c���t�5td�jd�ttd�}|j
j
d�}|jd|�ddd�y#1swYyxYw)Nr:zmsgid "foo"
msgstr[0] "bar"
r;zplural without msgid_pluralr<rAs   r� test_plural_without_msgid_pluralz0CompilationTest.test_plural_without_msgid_pluralLsX��
�Z����)�)�+�
�
(���=�C��'�'�.�.��)�C��M�M�7��=��Z�Z�rDc���t�5td�jd�ttd�}|j
j
d�}|jd|�ddd�y#1swYyxYw)Nr:z-msgid "foo"
msgid_plural "foos"
msgstr "bar"
r;z"indexed msgstr required for pluralr<rAs   r�(test_indexed_msgstr_without_msgid_pluralz8CompilationTest.test_indexed_msgstr_without_msgid_pluralWsX��
�Z����)�)�+�
�(���=�C��'�'�.�.��)�C��M�M�>��D��Z�Z�rDc���t�5td�jd�ttd�}|j
j
d�}|jd|�ddd�y#1swYyxYw)Nr:z"foo"
r;zSyntax errorr<rAs   r�test_generic_syntax_errorz)CompilationTest.test_generic_syntax_errorcsW��
�Z����)�)�+�
�(���=�C��'�'�.�.��)�C��M�M�.�#�.��Z�Z�rDN)	�__name__�
__module__�__qualname__r'r8rCrFrHrJ�rrrrs#��M� ,�,	E�	>�
E�/rrc�*�eZdZd�Zd�Zd�Zd�Zd�Zy)�CLITestc��dD]?}tt|�}|jjd�}|j	d|��Ay)N)z--helpz-hr;�EGenerate binary message catalog from textual translation description.)rr
r>r?r@)r"�optionrBr>s    r�	test_helpzCLITest.test_helpos:��&�F�"�6�6�2�C��'�'�.�.��)�C��M�M�a�cf�g�'rc��dD]M}tt|�}|jjd�j	�}|jd|��Oy)N)z	--versionz-Vr;z
msgfmt.py 1.2)rr
�outr?�stripr2)r"rSrBrVs    r�test_versionzCLITest.test_versionusC��)�F�"�6�6�2�C��'�'�.�.��)�/�/�1�C����_�c�2�*rc��ttd�}|jjd�}|j	d|�|j	d|�y)Nz--invalid-optionr;rRz&option --invalid-option not recognized)rr
r>r?r@rAs   r�test_invalid_optionzCLITest.test_invalid_option{s@��#�F�,>�?���g�g�n�n�W�%���
�
�]�_b�c��
�
�>��Drc��tt�}|jjd�j	dd�}|jd|�y)Nr;z
�
z=No input file given
Try `msgfmt --help' for more information.)rr
r>r?�replacer@rAs   r�test_no_input_filezCLITest.test_no_input_file�sA���v�&���g�g�n�n�W�%�-�-�f�d�;���
�
�B�CF�	Hrc�$�ttd�y)Nznonexistent.po)rr
)r"s r�test_nonexistent_filezCLITest.test_nonexistent_file�s
���f�&6�7rN)rKrLrMrTrXrZr^r`rNrrrPrPms��h�3�E�H�8rrPc���tjd�D]�}|jd�}t||�t	|d�5}t|�}ddd�|jd�}t	|d�5}jj�}t|d���}tj||d�	�|jd
�ddd���y#1swY��xYw#1swY��xYw)Nrrrz.json�wc�2�t|dt�|dfS)Nr)�
isinstance�tuple)�xs r�<lambda>z*update_catalog_snapshots.<locals>.<lambda>�s��z�!�A�$��/F��!��.Mr)�key�)�indentr\)rrrrrrr!�items�sorted�json�dump�write)rrr#�translations�catalog_file�datas      r�update_catalog_snapshotsrs�s����=�=��(���%�%�e�,����'�*��'�4�
 �A�*�1�-�L�!��*�*�7�3��
�,��
$���(�(�.�.�0�D��$�$M�N�D��I�I�d�A�a�(�
�G�G�D�M�	%�
$�)�
!�
 ��%�
$�s�C�3AC�C	�C%	�__main__r0z--snapshot-update)rm�sys�unittestr3r�pathlibr�test.support.os_helperr�test.support.script_helperrr�test.test_toolsrr	�__file__�parent�resolver�
script_dirr
r�TestCaserrPrsrK�len�argv�exit�mainrNrr�<module>r�s���.��
��#��+�N�5������N�!�!�M�1�:�:�<��
�(�^�f�
$�
�	�k�	!��5�R/�h�'�'�R/�h8�h���8�<
� �z��
�3�8�8�}�q��S�X�X�a�[�,?�?� �"��������H�M�M�O�	r

Youez - 2016 - github.com/yon3zu
LinuXploit