Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/distutils/tests/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/distutils/tests/__pycache__/test_config_cmd.cpython-35.opt-1.pyc



��Yf*
�@s�dZddlZddlZddlZddlmZddlmZmZddl	m
Z
ddlmZGdd�de
j
e
jej�Zd	d
�Zedkr�ee��dS)z#Tests for distutils.command.config.�N)�run_unittest)�	dump_file�config)�support)�logcs�eZdZdd�Z�fdd�Z�fdd�Zdd�Zeje	j
d	kd
�dd��Zd
d�Zdd�Z
�S)�ConfigTestCasecGs+x$|j�D]}|jj|�q
WdS)N)�
splitlines�_logs�append)�self�msg�args�line�r�D/opt/alt/python35/lib64/python3.5/distutils/tests/test_config_cmd.py�_infoszConfigTestCase._infocs8tt|�j�g|_tj|_|jt_dS)N)�superr�setUpr	r�info�old_logr)r)�	__class__rrrs	zConfigTestCase.setUpcs#|jt_tt|�j�dS)N)rrrrr�tearDown)r)rrrrszConfigTestCase.tearDowncCsxtjjt�dd}t|�}zt|j��}Wd|j�Xt|d�|j	t|j
�|d�dS)Nrz.pyzI am the header�)�os�path�splitext�__file__�open�len�	readlines�closer�assertEqualr	)rZ	this_file�fZnumlinesrrr�test_dump_files
zConfigTestCase.test_dump_file�win32zcan't test on WindowscCsr|j�\}}t|�}|jdddd�}|j|d�|jdddd�}|j|d�dS)N�pattern�xxxZbodyz	/* xxx */rZ_configtestr)�create_distrZ
search_cppr!)r�pkg_dir�dist�cmd�matchrrr�test_search_cpp(szConfigTestCase.test_search_cppcCs�|j�\}}t|�}dtj|_d|_dtj|_|j�|j|jddg�|j|jdg�|j|jddg�dS)Nzone%stwo�onezthree%sfour�twoZthreeZfour)	r'rr�pathsepZinclude_dirsZ	librariesZlibrary_dirsZensure_finalizedr!)rr(r)r*rrr�test_finalize_options4s	
z$ConfigTestCase.test_finalize_optionscCs�|j�}tjj|d�}tjj|d�}|j|d�|j|d�x-||fD]}|jtjj|��qcW|j�\}}t|�}|j	||�x-||fD]}|j
tjj|��q�WdS)Nr-r.r&)Zmkdtemprr�joinZ
write_fileZ
assertTrue�existsr'rZ_cleanZassertFalse)rZtmp_dir�f1�f2r"r(r)r*rrr�
test_cleanBszConfigTestCase.test_clean)�__name__�
__module__�__qualname__rrrr#�unittestZskipIf�sys�platformr,r0r5rr)rrrs'rcCs
tjt�S)N)r9Z	makeSuiterrrrr�
test_suiteUsr<�__main__)�__doc__r9rr:Ztest.supportrZdistutils.command.configrrZdistutils.testsrZ	distutilsrZLoggingSilencerZTempdirManagerZTestCaserr<r6rrrr�<module>sH