HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/distutils/tests/__pycache__/test_install_scripts.cpython-37.opt-1.pyc
B

!��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)�
build_scripts�buildz/splat/funk�)r�force�
skip_build�install)rr�DummyCommand�command_objrZassertFalser
rZassertIsNoneZ	build_dirZinstall_dir�finalize_optionsZ
assertTrueZassertEqual)�self�dist�cmd�r�@/usr/local/lib/python3.7/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�	|�}x�D]}|�
||�q�WdS)Ncs<��|�ttj��|�d�}z|�|�Wd|��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
)rrr	)rr
rr)Zmkdtemprrr
rrr�runr�listdirZassertIn)rr#�targetrrZ	installedrr)r!r"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?