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.10/distutils/tests/__pycache__/test_install_scripts.cpython-310.pyc
o

�iA
�@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
Gdd�dejejej
�Zd	d
�Zedkr>e
e��dSdS)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�A/usr/local/lib/python3.10/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]}|�
||�qJdS)NcsB��|�ttj��|�d�}z|�|�W|��dS|��w)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
srcCs
t�t�S)N)�unittestZ	makeSuiterrrrr�
test_suiteNs
r.�__main__)�__doc__rr-Z!distutils.command.install_scriptsrZdistutils.corerZdistutils.testsrZtest.supportrZTempdirManagerZLoggingSilencerZTestCaserr.r*rrrr�<module>s�A�