Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/distutils/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/distutils/tests/__pycache__/test_config.cpython-38.pyc
U

@��g4�@s�dZddlZddlZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZd	Z
d
ZdZGdd
�d
e
je
je
jej�ZGdd�de�Zdd�Zedkr�ee��dS)z"Tests for distutils.pypirc.pypirc.�N)�
PyPIRCCommand)�Distribution)�
set_threshold)�WARN)�support)�run_unittestz�[distutils]

index-servers =
    server1
    server2
    server3

[server1]
username:me
password:secret

[server2]
username:meagain
password: secret
realm:acme
repository:http://another.pypi/

[server3]
username:cbiggles
password:yh^%#rest-of-my-password
z.[server-login]
username:tarek
password:secret
zI[distutils]
index-servers =
    pypi

[pypi]
username:tarek
password:xxx
cs(eZdZ�fdd�Z�fdd�Z�ZS)�BasePyPIRCCommandTestCasecsntt|���|��|_|jtjd<|jtjd<tj�|jd�|_	t
�|_Gdd�dt�}||_
tt�|_dS)zPatches the environment.�HOMEZUSERPROFILEz.pypircc@s eZdZdd�Zdd�ZeZdS)z0BasePyPIRCCommandTestCase.setUp.<locals>.commandcSst�||�dS�N)r�__init__)�self�dist�r�:/opt/cppython/lib/python3.8/distutils/tests/test_config.pyrDsz9BasePyPIRCCommandTestCase.setUp.<locals>.command.__init__cSsdSr
r�rrrr�initialize_optionsFszCBasePyPIRCCommandTestCase.setUp.<locals>.command.initialize_optionsN)�__name__�
__module__�__qualname__rrZfinalize_optionsrrrr�commandCsrN)�superr�setUp�mkdtempZtmp_dir�os�environ�path�join�rcrr
r�_cmdrr�
old_threshold)rr��	__class__rrr:s
zBasePyPIRCCommandTestCase.setUpcst|j�tt|���dS)zRemoves the patch.N)rrrr�tearDownrr rrr"Ms
z"BasePyPIRCCommandTestCase.tearDown)rrrrr"�
__classcell__rrr rr5src@s$eZdZdd�Zdd�Zdd�ZdS)�PyPIRCCommandTestCasecCs�|�|jt�|�|j�}|��}tt|����}dddddg}|�	||�|�|jt
�|��}tt|����}dddddg}|�	||�dS)N)�passwordZsecret�ZrealmZpypi��
repositoryzhttps://upload.pypi.org/legacy/)�serverZserver1)�username�me)r)zserver-login)r*�tarek)�
write_filer�PYPIRCrr
�_read_pypirc�list�sorted�items�assertEqual�
PYPIRC_OLD�r�cmdZconfigZwaitedrrr�test_server_registrationUs&��z.PyPIRCCommandTestCase.test_server_registrationcCst|�|j�}|��}|�tj�|��|�dd�|�tj�|��t	|�}z|��}|�|t
�W5|�
�XdS)Nr,Zxxx)rr
Z_get_rc_fileZassertFalserr�existsZ
_store_pypircZ
assertTrue�open�close�readr3�WANTED)rr6r�fZcontentrrr�test_server_empty_registrationnsz4PyPIRCCommandTestCase.test_server_empty_registrationcCsV|�|jt�|�|j�}d|_|��}tt|�	���}dddddg}|�
||�dS)N�server3)r%zyh^%#rest-of-my-passwordr&r')r)r?)r*Zcbiggles)r-rr.rr
r(r/r0r1r2r3r5rrr�test_config_interpolation{s�z/PyPIRCCommandTestCase.test_config_interpolationN)rrrr7r>r@rrrrr$Ss
r$cCs
t�t�Sr
)�unittestZ	makeSuiter$rrrr�
test_suite�srB�__main__)�__doc__rrAZdistutils.corerrZ
distutils.logrrZdistutils.testsrZtest.supportrr.r4r<ZTempdirManagerZLoggingSilencerZEnvironGuardZTestCaserr$rBrrrrr�<module>s(�6

F1le Man4ger