Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/distutils/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/distutils/tests/__pycache__/test_config_cmd.cpython-38.pyc
U

@��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|��D]}|j�|�qdS�N)�
splitlines�_logs�append)�self�msg�args�line�r�>/opt/cppython/lib/python3.8/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.tearDowncCs\tj�t�dd}t|�}zt|���}W5|��Xt|d�|�	t|j
�|d�dS)Nrz.pyzI am the header�)�os�path�splitext�__file__�open�close�len�	readlinesr�assertEqualr)r
Z	this_file�fZnumlinesrrr�test_dump_files

zConfigTestCase.test_dump_file�win32zcan't test on WindowscCs�ddl}tdg�}|dk	r(|�d|�|��\}}t|�}|��|j}tjdd�dkrxd|j	d�
�krx|�d�|jdd	d
�}|�|d�|jdd	d
�}|�|d�dS)
Nr�preprocessorzThe %r command is not found�ZaixZxlczAxlc: The -E option overrides the -P, -o, and -qsyntaxonly options�xxxz	/* xxx */)�patternZbodyZ_configtestr)
�shutilrZskipTest�create_distrZ_check_compiler�compiler�sys�platformr)�lowerZ
search_cppr%)r
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
r4r5r3rrr�test_finalize_options<sz$ConfigTestCase.test_finalize_optionscCs�|��}tj�|d�}tj�|d�}|�|d�|�|d�||fD]}|�tj�|��qD|��\}}t|�}|�	||�||fD]}|�
tj�|��q�dS)Nr8r9r+)�mkdtemprr�joinZ
write_fileZ
assertTrue�existsr.rZ_cleanZassertFalse)r
Ztmp_dir�f1�f2r&r4r5r3rrr�
test_cleanJszConfigTestCase.test_clean)�__name__�
__module__�__qualname__rrrr'�unittestZskipIfr0r1r7r;rA�
__classcell__rrrrrs
rcCs
t�t�Sr	)rEZ	makeSuiterrrrr�
test_suite]srG�__main__)�__doc__rErr0Ztest.supportrrZdistutils.command.configrrZdistutils.testsrZ	distutilsrZLoggingSilencerZTempdirManagerZTestCaserrGrBrrrr�<module>s�R

F1le Man4ger