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



��YfA
�@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
Gdd�dejejej
�Zd	d
�Zedkr�e
e��dS)z,Tests for distutils.command.install_scripts.�N)�install_scripts)�Distribution)�support)�run_unittestc@s(eZdZdd�Zdd�ZdS)�InstallScriptsTestCasecCs�t�}tjdd�|jd<tjdddddd�|jd	<t|�}|j|j�|j|j�|j|j	�|j|j
�|j�|j|j�|j|j�|j
|j	d�|j
|j
d�dS)
N�
build_scriptsz/foo/bar�buildrz/splat/funk�force��
skip_build�install)rr�DummyCommand�command_objrZassertFalser	rZassertIsNoneZ	build_dirZinstall_dir�finalize_optionsZ
assertTrueZassertEqual)�self�dist�cmd�r�I/opt/alt/python35/lib64/python3.5/distutils/tests/test_install_scripts.py�test_default_settingss"			
z,InstallScriptsTestCase.test_default_settingscs�|j��g���fdd�}|dd�|dd�|dd�|j�}t�}tjd	��|jd
<tjd|dd
dd
�|jd<t|�}|j�|j�tj	|�}x�D]}|j
||�q�WdS)Nc
sN�j|�ttjj�|�d�}z|j|�Wd|j�XdS)N�w)�append�open�os�path�join�write�close)�name�text�f)�expected�sourcerr�write_script+s

z>InstallScriptsTestCase.test_installation.<locals>.write_scriptz
script1.pyz@#! /usr/bin/env python2.3
# bogus script w/ Python sh-bang
pass
z
script2.pyz8#!/usr/bin/python
# bogus script w/ Python sh-bang
pass
zshell.shz1#!/bin/sh
# bogus shell script w/ sh-bang
exit 0
rrrr	r
rr)Zmkdtemprrr
rrrZrunr�listdirZassertIn)rr#�targetrrZ	installedrr)r!r"r�test_installation's&


		


z(InstallScriptsTestCase.test_installationN)�__name__�
__module__�__qualname__rr&rrrrr
srcCs
tjt�S)N)�unittestZ	makeSuiterrrrr�
test_suiteNsr+�__main__)�__doc__rr*Z!distutils.command.install_scriptsrZdistutils.corerZdistutils.testsrZtest.supportrZTempdirManagerZLoggingSilencerZTestCaserr+r'rrrr�<module>s?