Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/distutils/tests/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/distutils/tests/__pycache__/test_build_clib.cpython-39.pyc

a

��g�@s�dZddlZddlZddlZddlmZmZddlmZddl	m
Z
ddlmZGdd�dej
ejej�Zd	d
�Zedkr�ee��dS)z'Tests for distutils.command.build_clib.�N)�run_unittest�missing_compiler_executable)�
build_clib)�DistutilsSetupError)�supportc@sFeZdZdd�Zdd�Zdd�Zdd�Ze�e	j
d	kd
�dd��Zd
S)�BuildCLibTestCasecCs�|��\}}t|�}|�t|jd�|�t|jddg�|�t|jddg�|�t|jddg�|�t|jdifd	g�difdd
difg}|�|�dS)N�foo�foo1�foo2)�r	)�namer
)rr	)zanother/namer
r)Zanotherr
�okZgood)�create_distr�assertRaisesrZcheck_library_list)�self�pkg_dir�dist�cmdZlibs�r�;/usr/local/lib/python3.9/distutils/tests/test_build_clib.py�test_check_library_dists*
�
�
��
��z)BuildCLibTestCase.test_check_library_distcCs�|��\}}t|�}difg|_|�t|j�dddifg|_|�t|j�ddddgifg|_|�|��ddg�dddifg|_|�|��ddg�dddifdddd	gifg|_|�|��gd
��dS)Nr�sourcesr�a�b)rrZname2�c�d)rrrr)rr�	librariesrrZget_source_files�assertEqual�rrrrrrr�test_get_source_files.s
�z'BuildCLibTestCase.test_get_source_filescCs�|��\}}t|�}Gdd�d�}|�|_dddifg}|�t|j|�ddt�ifg}|�|�ddt�ifg}|�|�dS)Nc@seZdZdd�ZeZdS)z<BuildCLibTestCase.test_build_libraries.<locals>.FakeCompilerc_sdS�Nr)�args�kwrrr�compileIszDBuildCLibTestCase.test_build_libraries.<locals>.FakeCompiler.compileN)�__name__�
__module__�__qualname__r#Zcreate_static_librrrr�FakeCompilerHsr'rrZnotvalid)rrZcompilerrrZbuild_libraries�list�tuple)rrrrr'�librrr�test_build_librariesDs
z&BuildCLibTestCase.test_build_librariescCsh|��\}}t|�}d|_|��|�|jdg�d|_|��|�|jg�d|j_|�t|j�dS)Nzone-dirZWONTWORK)	rrZinclude_dirsZfinalize_optionsrZdistributionrrrrrrr�test_finalize_optionsYsz'BuildCLibTestCase.test_finalize_options�win32zcan't test on WindowscCs�|��\}}t|�}tj�|d�}|�|d�dd|gifg|_tj�|d�}t�|�||_||_t	�}|dur�|�
d|�|��|�dt�
|��dS)Nzfoo.czint main(void) { return 1;}
rrZbuildzThe %r command is not foundzlibfoo.a)rr�os�path�joinZ
write_filer�mkdir�
build_temprZskipTest�runZassertIn�listdir)rrrrZfoo_cr2Zccmdrrr�test_runhs
zBuildCLibTestCase.test_runN)r$r%r&rrr+r,�unittestZskipIf�sys�platformr5rrrrrsrcCs
t�t�Sr )r6Z	makeSuiterrrrr�
test_suite�sr9�__main__)�__doc__r6r.r7Ztest.supportrrZdistutils.command.build_clibrZdistutils.errorsrZdistutils.testsrZTempdirManagerZLoggingSilencerZTestCaserr9r$rrrr�<module>s�v

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists