HEX
Server: Apache
System: Linux p3plzcpnl506847.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: slfopp7cb1df (5698090)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/python38/lib/python3.8/distutils/tests/__pycache__/test_install_scripts.cpython-38.opt-2.pyc
U

�i�_A
�@sxddlZddlZddlmZddlmZddlmZddlm	Z	Gdd�dej
ejej�Z
dd	�Zed
krte	e��dS)�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�C/opt/python38/lib/python3.8/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)Ncs<��|�ttj��|�d�}z|�|�W5|��XdS)N�w)�append�open�os�path�join�close�write)�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__)rr-Z!distutils.command.install_scriptsrZdistutils.corerZdistutils.testsrZtest.supportrZTempdirManagerZLoggingSilencerZTestCaserr.r*rrrr�<module>s�A