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

a

��gA
�@s|dZddlZddlZddlmZddlmZddlmZddl	m
Z
Gdd�dejejej
�Zd	d
�Zedkrxe
e��dS)z,Tests for distutils.command.install_scripts.�N)�install_scripts)�Distribution)�support)�run_unittestc@seZdZdd�Zdd�ZdS)�InstallScriptsTestCasecCs�t�}tjdd�|jd<tjdddd�|jd<t|�}|�|j�|�|j�|�|j	�|�|j
�|��|�|j�|�|j�|�
|j	d�|�
|j
d�dS)Nz/foo/bar�Z
build_scripts�buildz/splat/funk��r�force�
skip_build�install)rr�DummyCommand�command_objrZassertFalserrZassertIsNoneZ	build_dirZinstall_dir�finalize_optionsZ
assertTrueZassertEqual)�self�dist�cmd�r�@/usr/local/lib/python3.9/distutils/tests/test_install_scripts.py�test_default_settingss&��z,InstallScriptsTestCase.test_default_settingscs�|���g���fdd�}|dd�|dd�|dd�|��}t�}tj�d	�|jd
<tj|ddd�|jd
<t|�}|��|��t�	|�}�D]}|�
||�q�dS)NcsD��|�ttj��|�d�}z|�|�W|��n
|��0dS)N�w)�append�open�os�path�join�write�close)�name�text�f�Zexpected�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
rrr	r
r
)�mkdtemprrrrrr�runr�listdirZassertIn)rr$�targetrrZ	installedrrr"r�test_installation's(


�
z(InstallScriptsTestCase.test_installationN)�__name__�
__module__�__qualname__rr)rrrrr
srcCs
t�t�S)N)�unittestZ	makeSuiterrrrr�
test_suiteNsr.�__main__)�__doc__rr-Z!distutils.command.install_scriptsrZdistutils.corerZdistutils.testsrZtest.supportrZTempdirManagerZLoggingSilencerZTestCaserr.r*rrrr�<module>s�A

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