Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.11/distutils/tests/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.11/distutils/tests/__pycache__/test_config.cpython-311.opt-2.pyc

�

SԚg�����	ddlZddlZddlmZddlmZddlmZddlmZddlm	Z	dZ
dZd	ZGd
�de	j
e	je	jej��ZGd�d
e��Zedkrej��dSdS)�N)�
PyPIRCCommand)�Distribution)�
set_threshold)�WARN)�supportz�[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
c�(��eZdZ�fd�Z�fd�Z�xZS)�BasePyPIRCCommandTestCasec���	tt|�����|���|_|jt
jd<|jt
jd<t
j�|jd��|_	t��|_Gd�dt��}||_
tt��|_dS)N�HOME�USERPROFILEz.pypircc��eZdZd�Zd�ZeZdS)�0BasePyPIRCCommandTestCase.setUp.<locals>.commandc�0�tj||��dS�N)r�__init__)�self�dists  �8/usr/local/lib/python3.11/distutils/tests/test_config.pyrz9BasePyPIRCCommandTestCase.setUp.<locals>.command.__init__Cs���&�t�T�2�2�2�2�2�c��dSr�)rs r�initialize_optionszCBasePyPIRCCommandTestCase.setUp.<locals>.command.initialize_optionsEs���rN)�__name__�
__module__�__qualname__rr�finalize_optionsrrr�commandrBs4������
3�
3�
3�
�
�
�1���rr)�superr	�setUp�mkdtemp�tmp_dir�os�environ�path�join�rcrrr�_cmdrr�
old_threshold)rr�	__class__s  �rrzBasePyPIRCCommandTestCase.setUp9s����&�
�'��.�.�4�4�6�6�6��|�|�~�~���!�\��
�6��$(�L��
�=�!��'�,�,�t�|�Y�7�7��� �N�N��	�	2�	2�	2�	2�	2�m�	2�	2�	2���	�*�4�0�0����rc���	t|j��tt|�����dSr)rr(rr	�tearDown)rr)s �rr+z"BasePyPIRCCommandTestCase.tearDownLs:��� ��d�(�)�)�)�
�'��.�.�7�7�9�9�9�9�9r)rrrrr+�
__classcell__)r)s@rr	r	4sQ�������
1�1�1�1�1�&:�:�:�:�:�:�:�:�:rr	c� �eZdZd�Zd�Zd�ZdS)�PyPIRCCommandTestCasec�*�|�|jt��|�|j��}|���}t
t|�������}gd�}|�	||��|�|jt��|���}t
t|�������}gd�}|�	||��dS)N)��password�secret��realm�pypi��
repositoryzhttps://upload.pypi.org/legacy/)�server�server1)�username�me)r0r3r6)r8zserver-login)r:�tarek)�
write_filer&�PYPIRCr'r�_read_pypirc�list�sorted�items�assertEqual�
PYPIRC_OLD�r�cmd�config�waiteds    r�test_server_registrationz.PyPIRCCommandTestCase.test_server_registrationTs���	
������(�(�(��i�i��	�"�"���!�!�#�#���f�V�\�\�^�^�,�,�-�-��=�=�=��	
�����(�(�(�	
������,�,�,��!�!�#�#���f�V�\�\�^�^�,�,�-�-��E�E�E��	
�����(�(�(�(�(rc�.�|�|j��}|���}|�tj�|����|�dd��|�tj�|����t|��}	|�
��}|�|t��|�
��dS#|�
��wxYw)Nr<�xxx)r'r�_get_rc_file�assertFalser"r$�exists�
_store_pypirc�
assertTrue�open�readrC�WANTED�close)rrFr&�f�contents     r�test_server_empty_registrationz4PyPIRCCommandTestCase.test_server_empty_registrationms����i�i��	�"�"��
�
�
�
�
����������+�+�,�,�,����'�5�)�)�)��������r�*�*�+�+�+���H�H��	��f�f�h�h�G����W�f�-�-�-�
�G�G�I�I�I�I�I��A�G�G�I�I�I�I���s�9/C>�>Dc�@�|�|jt��|�|j��}d|_|���}tt|�	������}gd�}|�
||��dS)N�server3))r1zyh^%#rest-of-my-passwordr3r6)r8rY)r:�cbiggles)r=r&r>r'rr7r?r@rArBrCrEs    r�test_config_interpolationz/PyPIRCCommandTestCase.test_config_interpolationzs���������(�(�(��i�i��	�"�"��"����!�!�#�#���f�V�\�\�^�^�,�,�-�-��C�C�C��	
�����(�(�(�(�(rN)rrrrIrWr[rrrr.r.RsA������)�)�)�2���)�)�)�)�)rr.�__main__)r"�unittest�distutils.corerr�
distutils.logrr�distutils.testsrr>rDrS�TempdirManager�LoggingSilencer�EnvironGuard�TestCaser	r.r�mainrrr�<module>rfs��(�	�	�	�	�����(�(�(�(�(�(�'�'�'�'�'�'�'�'�'�'�'�'�������#�#�#�#�#�#�
��.�
�
��:�:�:�:�:�� 6�#�3�#�0�$�-�:�:�:�<3)�3)�3)�3)�3)�5�3)�3)�3)�l�z����H�M�O�O�O�O�O��r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists