Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/distutils/tests/test_config.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��Qc@sdZddlZddlZddlZddlZddlZddlmZddlmZddl	m
Z
ddl	mZddlm
Z
ddlmZd	Zd
ZdZde
je
je
jejfd
��YZd�Zedkree��ndS(s"Tests for distutils.pypirc.pypirc.i�N(t
PyPIRCCommand(tDistribution(t
set_threshold(tWARN(tsupport(trun_unittests�[distutils]

index-servers =
    server1
    server2

[server1]
username:me
password:secret

[server2]
username:meagain
password: secret
realm:acme
repository:http://another.pypi/
s.[server-login]
username:tarek
password:secret
sI[distutils]
index-servers =
    pypi

[pypi]
username:tarek
password:xxx
tPyPIRCCommandTestCasecBs,eZd�Zd�Zd�Zd�ZRS(cCs�tt|�j�|j�|_|jtjd<tjj|jd�|_	t
�|_dtfd��Y}||_
tt�|_dS(sPatches the environment.tHOMEs.pypirctcommandcBs eZd�Zd�ZeZRS(cSstj||�dS(N(Rt__init__(tselftdist((s1/sys/lib/python2.7/distutils/tests/test_config.pyR	AscSsdS(N((R
((s1/sys/lib/python2.7/distutils/tests/test_config.pytinitialize_optionsCs(t__name__t
__module__R	Rtfinalize_options(((s1/sys/lib/python2.7/distutils/tests/test_config.pyR@s		N(tsuperRtsetUptmkdtempttmp_dirtostenvirontpathtjointrcRRRt_cmdRRt
old_threshold(R
R((s1/sys/lib/python2.7/distutils/tests/test_config.pyR8s	cCs$t|j�tt|�j�dS(sRemoves the patch.N(RRRRttearDown(R
((s1/sys/lib/python2.7/distutils/tests/test_config.pyRJs
cCs�|j|jt�|j|j�}|j�}|j�}|j�d
ddddg}|j||�|j|jt	�|j�}|j�}|j�dddddg}|j||�dS(Ntpasswordtsecrettrealmtpypit
repositoryshttp://pypi.python.org/pypitservertserver1tusernametmesserver-loginttarek(RR(RR(R shttp://pypi.python.org/pypi(R!R"(R#R$(RR(RR(R shttp://pypi.python.org/pypi(R!sserver-login(R#R%(
t
write_fileRtPYPIRCRRt_read_pypirctitemstsorttassertEqualt
PYPIRC_OLD(R
tcmdtconfigtwaited((s1/sys/lib/python2.7/distutils/tests/test_config.pyttest_server_registrationOs"

cCs�|j|j�}|j�}|jtjj|��|jdd�|jtjj|��t|�}z |j	�}|j
|t�Wd|j�XdS(NR%txxx(
RRt_get_rc_filet
assertTrueRRtexistst
_store_pypirctopentreadR+tWANTEDtclose(R
R-Rtftcontent((s1/sys/lib/python2.7/distutils/tests/test_config.pyttest_server_empty_registrationjs(R
RRRR0R<(((s1/sys/lib/python2.7/distutils/tests/test_config.pyR3s			cCs
tjt�S(N(tunittestt	makeSuiteR(((s1/sys/lib/python2.7/distutils/tests/test_config.pyt
test_suitewst__main__(t__doc__tsysRR=ttempfiletshutiltdistutils.coreRRt
distutils.logRRtdistutils.testsRttest.test_supportRR'R,R8tTempdirManagertLoggingSilencertEnvironGuardtTestCaseRR?R
(((s1/sys/lib/python2.7/distutils/tests/test_config.pyt<module>s*
	A	

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].