HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/distutils/tests/__pycache__/test_check.cpython-37.opt-1.pyc
B

!��gO�@s�dZddlZddlZddlZddlmZddlmZmZddl	m
Z
ddlmZyddl
Z
Wnek
rtdZ
YnXej�e�ZGdd�de
je
jej�Zd	d
�Zedkr�ee��dS)z"Tests for distutils.command.check.�N)�run_unittest)�check�HAS_DOCUTILS)�support)�DistutilsSetupErrorc@sbeZdZddd�Zdd�Ze�ed�dd��Ze�ed�d	d
��Z	e�ed�dd��Z
d
d�ZdS)�
CheckTestCaseNc
Ks�|dkri}|dk	r&t��}t�|�|jf|�\}}t|�}|��x |��D]\}}	t|||	�qPW|��|�	�|dk	r�t�|�|S)N)
�os�getcwd�chdir�create_distrZinitialize_options�items�setattrZensure_finalized�run)
�self�metadata�cwd�optionsZold_dir�pkg_info�dist�cmd�name�value�r�6/usr/local/lib/python3.7/distutils/tests/test_check.py�_runs

zCheckTestCase._runcCs�|��}|�|jd�dddddd�}|�|�}|�|jd�|jt|jifddi�|j|dd�}|�|jd�dddddd	d
d�}|�|�}|�|jd�dS)N��xxx)�url�author�author_emailr�versionr�strict�)r!uÉricuSomething about esszet ßuMore things about esszet ß)rrrrr �description�long_description)r�assertEqual�	_warnings�assertRaisesr)rrrrrr�test_check_metadata)s"


z!CheckTestCase.test_check_metadatazwon't test without docutilscCsT|��\}}t|�}d}|�|�}|�t|�d�d}|�|�}|�t|�d�dS)Nztitle
===

testr"ztitle
=====

testr)rr�_check_rst_datar%�len)rrrr�broken_rest�msgs�restrrr�test_check_documentJs

z!CheckTestCase.test_check_documentcCs�d}|j|d�\}}t|�}|��|�|jd�ddddd|d�}|jt|j|fddd��d|d<|j|ddd�}|�|jd	�d
|d<|j|tddd�}|�|jd	�dS)Nztitle
===

test)r$r"r)rrrrr r$)r!�restructuredtextutitle
=====

test ßr$rz)title
=====

.. include:: includetest.rst)rr!r/)	rr�check_restructuredtextr%r&r'rr�HERE)rr+rrrrrrr�test_check_restructuredtextYs"z)CheckTestCase.test_check_restructuredtextcCs�g}|�t�d��|�t�d��xx|D]p}|j|d�\}}t|�}|��|�|�}tdk	rr|�t	|�d�q*|�t	|�d�|�t
|dd�d�q*WdS)Nz}            Here's some code:

            .. code:: python

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

            .. code-block:: python

                def foo():
                    pass
            )r$rr"z0Cannot analyze code. Pygments package not found.)�append�textwrap�dedentrrr0r)�pygmentsr%r*�str)rZexample_rst_docsZrest_with_coderrrr,rrr�1test_check_restructuredtext_with_syntax_highlightts 

z?CheckTestCase.test_check_restructuredtext_with_syntax_highlightcCs(ddd�}|jt|jifddd��dS)Nr)rrr")r!r/)r'rr)rrrrr�test_check_all�s

zCheckTestCase.test_check_all)NN)�__name__�
__module__�__qualname__rr(�unittestZ
skipUnlessrr.r2r8r9rrrrrs
!$rcCs
t�t�S)N)r=Z	makeSuiterrrrr�
test_suite�sr>�__main__)�__doc__rr4r=Ztest.supportrZdistutils.command.checkrrZdistutils.testsrZdistutils.errorsrr6�ImportError�path�dirname�__file__r1ZLoggingSilencerZTempdirManagerZTestCaserr>r:rrrr�<module>s&