Your IP : 216.73.216.213


Current Path : /opt/alt/python34/lib64/python3.4/distutils/tests/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/distutils/tests/__pycache__/test_install_lib.cpython-34.pyc

�
i f��@s�dZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZGdd	�d	ejejejej�Zd
d�Zedkr�ee��ndS)
z)Tests for distutils.command.install_data.�N)�install_lib)�	Extension)�support)�DistutilsOptionError)�run_unittestc@saeZdZdd�Zejejd�dd��Zdd�Z	dd	�Z
d
d�ZdS)
�InstallLibTestCasecCs�|j�d}t|�}|j�|j|jd�|j|jd�d|_|jt|j�d|_|jt|j�d|_|j�|j|jd�dS)N�r�foo�4�2�)�create_distrZfinalize_options�assertEqual�compile�optimizeZassertRaisesr)�self�dist�cmd�r�E/opt/alt/python34/lib64/python3.4/distutils/tests/test_install_lib.py�test_finalize_optionss
			
z(InstallLibTestCase.test_finalize_optionszbyte-compile disabledcCs�|j�\}}tj|�t|�}d|_|_tjj|d�}|j|d�|j	|g�t
jjddd�}t
jjddd�}|j
tjj|��|j
tjj|��dS)Nrzfoo.pyz
# python file�debug_overrideTF)r
�os�chdirrrr�path�join�
write_file�byte_compile�	importlib�util�cache_from_sourceZ
assertTrue�exists)r�project_dirrr�fZpyc_fileZpyo_filerrr�test_byte_compile%s
		z$InstallLibTestCase.test_byte_compilecCs�|j�\}}tj|�tjd�t|�}d|_|_|j�|_tj	j
|dd�}|j|d�tddg�g|j
_dg|j
_d|j
_|j�}|jt|�d|�dS)	N�spamrz__init__.pyz# python packager	�xxxzsetup.py�)r
rr�mkdirrrr�mkdtemp�install_dirrrrr�distribution�ext_modules�packages�script_nameZget_outputsr�len)rr"rrr#Zoutputsrrr�test_get_outputs6s

z#InstallLibTestCase.test_get_outputscCs�|j�\}}tj|�tjd�t|�}d|_|_|j�|_tj	j
|dd�}|j|d�tddg�g|j
_dg|j
_d|j
_|j�}|jt|�d|�dS)	Nr%rz__init__.pyz# python packager	r&zsetup.pyr)r
rrr(rrrr)r*rrrrr+r,r-r.Z
get_inputsrr/)rr"rrr#Zinputsrrr�test_get_inputsJs

z"InstallLibTestCase.test_get_inputscCs}|j�d}t|�}d|_d|_tj}dt_z|jg�Wd|t_X|jd|jdd�dS)NrTzbyte-compiling is disabledr)	r
rrr�sys�dont_write_bytecoderZassertInZlogs)rrrZold_dont_write_bytecoderrr�test_dont_write_bytecode^s				
z+InstallLibTestCase.test_dont_write_bytecodeN)�__name__�
__module__�__qualname__r�unittestZskipIfr2r3r$r0r1r4rrrrrs
!rcCs
tjt�S)N)r8Z	makeSuiterrrrr�
test_suiteosr9�__main__)�__doc__r2r�importlib.utilrr8Zdistutils.command.install_librZdistutils.extensionrZdistutils.testsrZdistutils.errorsrZtest.supportrZTempdirManagerZLoggingSilencerZEnvironGuardZTestCaserr9r5rrrr�<module>s ^