Your IP : 216.73.217.32


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_msvccompiler.cpython-35.pyc



��YfZ�@s�dZddlZddlZddlZddlmZddlmZddlm	Z	ej
dkrodndZejedke�Gdd	�d	ej
ej��Zd
d�Zedkr�e	e��dS)
z"Tests for distutils._msvccompiler.�N)�DistutilsPlatformError)�support)�run_unittest�win32zThese tests are only for win32c@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�msvccompilerTestCasecCsXddlj}dd�}|j}||_z|jt|jd�Wd||_XdS)NrcSsdS)N)NN�)�	plat_specrr�F/opt/alt/python35/lib64/python3.5/distutils/tests/test_msvccompiler.py�_find_vcvarsallsz>msvccompilerTestCase.test_no_compiler.<locals>._find_vcvarsallzwont find this version)�distutils._msvccompiler�
_msvccompilerr
ZassertRaisesr�_get_vc_env)�selfrr
�old_find_vcvarsallrrr	�test_no_compilers			z%msvccompilerTestCase.test_no_compilercs�ddlj}|j��fdd�}||_z@|j�}|j�|jd|j�|jd|j�Wd�|_XdS)Nrcs�|�ddfS)Nrr)r)rrr	r
(szCmsvccompilerTestCase.test_compiler_options.<locals>._find_vcvarsallz/MTz/MD)rrr
�MSVCCompiler�
initialize�assertInZcompile_optionsZassertNotIn)rrr
�compilerr)rr	�test_compiler_options#s		
z*msvccompilerTestCase.test_compiler_optionscs�ddlj}|j��fdd�}||_zg|j�}|j�}|j�|j|�|jtj	j
tj	j|tj	jt
����Wd�|_XdS)Nrcs�|�dtfS)Nr)�__file__)r)rrr	r
:szAmsvccompilerTestCase.test_vcruntime_copy.<locals>._find_vcvarsall)rrr
�mkdtemprr�_copy_vcruntime�
assertTrue�os�path�isfile�join�basenamer)rrr
�tempdirrr)rr	�test_vcruntime_copy4s		

 z(msvccompilerTestCase.test_vcruntime_copycCs�ddlj}|j�}|j�}|j�|j}|jtjj	|��|j
|�|jtjj	tjj|tjj
|����dS)Nr)rrrrrZ_vcruntime_redistrrrrrZassertFalserr)rrrrZdllrrr	�test_vcruntime_skip_copyHs
	
z-msvccompilerTestCase.test_vcruntime_skip_copycCs�ddlj}d}d}tjjdd�}|tj|<zC|jd�}|j|j�|�|j|||j��Wdtjj|�|r�|tjd<XdS)NruṰḖṤṪ┅ṼẨṜu	₃⁴₅ZDISTUTILS_USE_SDKZx86)	rrr�environ�popr
r�lowerZassertEqual)rrZtest_varZ
test_valueZold_distutils_use_sdk�envrrr	�test_get_vc_env_unicodeVs
z,msvccompilerTestCase.test_get_vc_env_unicodeN)�__name__�
__module__�__qualname__rrr r!r&rrrr	rs
rcCs
tjt�S)N)�unittestZ	makeSuiterrrrr	�
test_suitehsr+�__main__)�__doc__�sysr*rZdistutils.errorsrZdistutils.testsrZtest.supportr�platformZSKIP_MESSAGEZ
skipUnlessZTempdirManagerZTestCaserr+r'rrrr	�<module>s"X