Your IP : 216.73.216.213


Current Path : /opt/alt/python34/lib64/python3.4/distutils/tests/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/distutils/tests/__pycache__/test_check.cpython-34.pyo

�
i fj�@s�dZddlZddlZddlmZddlmZmZddlm	Z	ddl
mZGdd�de	je	j
ej�Zd	d
�Zedkr�ee��ndS)z"Tests for distutils.command.check.�N)�run_unittest)�check�HAS_DOCUTILS)�support)�DistutilsSetupErrorc@s�eZdZddd�Zdd�Zejed�dd��Zejed�d	d
��Z	ejed�dd��Z
d
d�ZdS)�
CheckTestCaseNcKs�|dkri}n|j|�\}}t|�}|j�x*|j�D]\}}t|||�qMW|j�|j�|S)N)�create_distrZinitialize_options�items�setattrZensure_finalizedZrun)�self�metadataZoptions�pkg_info�dist�cmd�name�value�r�?/opt/alt/python34/lib64/python3.4/distutils/tests/test_check.py�_runs	


zCheckTestCase._runcCs|j�}|j|jd�idd6dd6dd6dd6dd6}|j|�}|j|jd�|jt|jiid	d
6�|j|d
d	�}|j|jd�idd6dd6dd6dd6dd6dd
6dd6}|j|�}|j|jd�dS)N��xxx�url�author�author_emailr�versionr��strictuÉricuSomething about esszet ßZdescriptionuMore things about esszet ß�long_description)r�assertEqual�	_warnings�assertRaisesr)rrrrrr�test_check_metadatas" 
z!CheckTestCase.test_check_metadatazwon't test without docutilscCsx|j�\}}t|�}d}|j|�}|jt|�d�d}|j|�}|jt|�d�dS)Nztitle
===

testrztitle
=====

testr)rr�_check_rst_datar�len)rr
rr�broken_rest�msgs�restrrr�test_check_document;sz!CheckTestCase.test_check_documentcCs�d}|jd|�\}}t|�}|j�|j|jd�idd6dd6dd6dd6dd	6|d6}|jt|j|idd
6dd6�d|d<|j|d
ddd�}|j|jd
�dS)Nztitle
===

testrrrrrrrrr�restructuredtextutitle
=====

test ßr)rr�check_restructuredtextrrr rr)rr$r
rrrrrr�test_check_restructuredtextJs


z)CheckTestCase.test_check_restructuredtextcCs�g}|jtjd��|jtjd��xt|D]l}|jd|�\}}t|�}|j�|j|jd�|j|�}|jt	|�d�q9WdS)Nz}            Here's some code:

            .. code:: python

                def foo():
                    pass
            z�            Here's some code:

            .. code-block:: python

                def foo():
                    pass
            rr)
�append�textwrap�dedentrrr)rrr"r#)rZexample_rst_docsZrest_with_coder
rrr%rrr�1test_check_restructuredtext_with_syntax_highlight`s



z?CheckTestCase.test_check_restructuredtext_with_syntax_highlightcCs?idd6dd6}|jt|jiidd6dd6�dS)Nrrrrrr()r rr)rrrrr�test_check_all~s
zCheckTestCase.test_check_all)�__name__�
__module__�__qualname__rr!�unittestZ
skipUnlessrr'r*r.r/rrrrr
s!rcCs
tjt�S)N)r3Z	makeSuiterrrrr�
test_suite�sr4�__main__)�__doc__r,r3Ztest.supportrZdistutils.command.checkrrZdistutils.testsrZdistutils.errorsrZLoggingSilencerZTempdirManagerZTestCaserr4r0rrrr�<module>sy