Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/test/test_tools/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/test/test_tools/__pycache__/test_i18n.cpython-35.opt-2.pyc



���]
�@srddlZddlZddlmZddlmZmZddlmZe�Gdd�dej	�Z
dS)�N)�assert_python_ok)�skip_if_missing�toolsdir)�temp_cwdc@sLeZdZejjedd�Zdd�Zdd�Z	dd�Z
d	S)
�Test_pygettextZi18nzpygettext.pycCsti}xg|jd�D]V}|s|jd�r5q|jd�}|jdd�\}}|j�||<qW|S)	N�
�#�msgid�msgstr�"�:�)rr	r
)�split�
startswith�strip)�self�dataZheaders�line�key�val�r�./opt/alt/python35/lib64/python3.5/test_i18n.py�
get_headerszTest_pygettext.get_headercCs�td���}t|j�td��}|j�}WdQRX|j|�}|jd|�|jd|�|jd|�|jd|�|jd|�|jd|�|jd|�|jd	|�|jd
|�WdQRXdS)Nzmessages.potzProject-Id-VersionzPOT-Creation-DatezPO-Revision-DatezLast-Translatorz
Language-TeamzMIME-VersionzContent-TypezContent-Transfer-EncodingzGenerated-By)rr�script�open�readrZassertIn)r�cwd�fpr�headerrrr�test_headers
zTest_pygettext.test_headercCs�ddlm}td���}t|j�td��}|j�}WdQRX|j|�}|d}|jd�r�|dtd��}|j	|d�WdQRXdS)Nr)�datetimezmessages.potzPOT-Creation-Datez\nz%Y-%m-%d %H:%M%z)
r rrrrrr�endswith�len�strptime)rr rrrrZcreationDaterrr�test_POT_Creation_Date9s

z%Test_pygettext.test_POT_Creation_DateN)�__name__�
__module__�__qualname__�os�path�joinrrrrr$rrrrrsr)r(ZunittestZtest.support.script_helperrZtest.test_toolsrrZtest.supportrZTestCaserrrrr�<module>s