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_config_cmd.cpython-37.opt-1.pyc
B

!��g�
�@s�dZddlZddlZddlZddlmZmZddlmZm	Z	ddl
mZddlm
Z
Gdd�dejejej�Zd	d
�Zedkr�ee��dS)z#Tests for distutils.command.config.�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"x|��D]}|j�|�q
WdS)N)�
splitlines�_logs�append)�self�msg�args�line�r�;/usr/local/lib/python3.7/distutils/tests/test_config_cmd.py�_infoszConfigTestCase._infocs(tt|���g|_tj|_|jt_dS)N)�superr�setUpr
r�info�old_logr)r)�	__class__rrrszConfigTestCase.setUpcs|jt_tt|���dS)N)rrrrr�tearDown)r)rrrrszConfigTestCase.tearDowncCs\tj�t�dd}t|�}zt|���}Wd|��Xt|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_file�win32zcan't test on WindowscCsltdg�}|dk	r |�d|�|��\}}t|�}|jddd�}|�|d�|jddd�}|�|d�dS)	NZpreprocessorzThe %r command is not found�xxxz	/* xxx */)�patternZbodyrZ_configtestr)rZskipTest�create_distrZ
search_cppr")r�cmd�pkg_dir�dist�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r*r+r)rrr�test_finalize_options7sz$ConfigTestCase.test_finalize_optionscCs�|��}tj�|d�}tj�|d�}|�|d�|�|d�x"||fD]}|�tj�|��qFW|��\}}t|�}|�	||�x"||fD]}|�
tj�|��q�WdS)Nr.r/r&)Zmkdtemprr�joinZ
write_fileZ
assertTrue�existsr(rZ_cleanZassertFalse)rZtmp_dir�f1�f2r#r*r+r)rrr�
test_cleanEszConfigTestCase.test_clean)�__name__�
__module__�__qualname__rrrr$�unittestZskipIf�sys�platformr-r1r6�
__classcell__rr)rrrsrcCs
t�t�S)N)r:Z	makeSuiterrrrr�
test_suiteXsr>�__main__)�__doc__r:rr;Ztest.supportrrZdistutils.command.configrrZdistutils.testsrZ	distutilsrZLoggingSilencerZTempdirManagerZTestCaserr>r7rrrr�<module>sK