Your IP : 216.73.216.213


Current Path : /opt/alt/python39/lib64/python3.9/distutils/tests/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/distutils/tests/__pycache__/test_config_cmd.cpython-39.opt-2.pyc

a

XC?h��@s�ddlZddlZddlZddlmZmZddlmZmZddl	m
Z
ddlmZGdd�de
j
e
jej�Zdd	�Zed
kr�ee��dS)�N)�run_unittest�missing_compiler_executable)�	dump_file�config)�support)�logcsbeZdZdd�Z�fdd�Z�fdd�Zdd�Ze�e	j
d	kd
�dd��Zd
d�Zdd�Z
�ZS)�ConfigTestCasecGs|��D]}|j�|�qdS�N)�
splitlines�_logs�append)�self�msg�args�line�r�D/opt/alt/python39/lib64/python3.9/distutils/tests/test_config_cmd.py�_infoszConfigTestCase._infocs(tt|���g|_tj|_|jt_dSr	)�superr�setUprr�info�old_logr�r
��	__class__rrrszConfigTestCase.setUpcs|jt_tt|���dSr	)rrrrr�tearDownrrrrrszConfigTestCase.tearDowncCsdtj�t�dd}t|�}zt|���}W|��n
|��0t|d�|�	t|j
�|d�dS)Nrz.pyzI am the header�)�os�path�splitext�__file__�open�len�	readlines�closer�assertEqualr)r
Z	this_file�fZnumlinesrrr�test_dump_files
zConfigTestCase.test_dump_fileZwin32zcan't test on WindowscCs�tdg�}|dur |�d|�|��\}}t|�}|��|j}tjdd�dkrpd|jd�	�vrp|�d�|j
dd	d
�}|�|d�|j
dd	d
�}|�|d�dS)
N�preprocessorzThe %r command is not found�ZaixZxlcrzAxlc: The -E option overrides the -P, -o, and -qsyntaxonly options�xxxz	/* xxx */)�pattern�bodyZ_configtestr)rZskipTest�create_distrZ_check_compiler�compiler�sys�platformr(�lowerZ
search_cppr%)r
�cmd�pkg_dir�distr.�matchrrr�test_search_cpp(s
$
zConfigTestCase.test_search_cppcCsr|��\}}t|�}dtj|_d|_dtj|_|��|�|jddg�|�|jdg�|�|jddg�dS)Nzone%stwo�onezthree%sfour�twoZthreeZfour)	r-rr�pathsepZinclude_dirsZ	librariesZlibrary_dirsZensure_finalizedr%)r
r3r4r2rrr�test_finalize_options;sz$ConfigTestCase.test_finalize_optionscCs�|��}tj�|d�}tj�|d�}|�|d�|�|d�||fD]}|�tj�|��qD|��\}}t|�}|�	||�||fD]}|�
tj�|��q�dS)Nr7r8r*)Zmkdtemprr�joinZ
write_fileZ
assertTrue�existsr-rZ_cleanZassertFalse)r
Ztmp_dir�f1�f2r&r3r4r2rrr�
test_cleanIszConfigTestCase.test_clean)�__name__�
__module__�__qualname__rrrr'�unittestZskipIfr/r0r6r:r?�
__classcell__rrrrrs
rcCs
t�t�Sr	)rCZ	makeSuiterrrrr�
test_suite\srE�__main__)rCrr/Ztest.supportrrZdistutils.command.configrrZdistutils.testsrZ	distutilsrZLoggingSilencerZTempdirManagerZTestCaserrEr@rrrr�<module>s�Q