cpython: 703d9066c459 (original) (raw)
Mercurial > cpython
changeset 102115:703d9066c459
Issue #20120: Merge from 3.5 [#20120]
Berker Peksag berker.peksag@gmail.com | |
---|---|
date | Mon, 20 Jun 2016 21:42:05 +0300 |
parents | 30b6cd2b3440(current diff)83d731f01dde(diff) |
children | db5fe5c4d09d |
files | Lib/distutils/tests/test_config.py |
diffstat | 1 files changed, 19 insertions(+), 0 deletions(-)[+] [-] Lib/distutils/tests/test_config.py 19 |
line wrap: on
line diff
--- a/Lib/distutils/tests/test_config.py +++ b/Lib/distutils/tests/test_config.py @@ -16,6 +16,7 @@ PYPIRC = """[](#l1.3) index-servers = server1 server2
[server1] username:me @@ -26,6 +27,10 @@ username:meagain password: secret realm:acme repository:http://another.pypi/[](#l1.14) + +[server3] +username:cbiggles +password:yh^%#rest-of-my-password """ PYPIRC_OLD = """[](#l1.21) @@ -111,6 +116,20 @@ class PyPIRCCommandTestCase(support.Temp finally: f.close()
- def test_config_interpolation(self):
# using the % character in .pypirc should not raise an error (#20120)[](#l1.27)
self.write_file(self.rc, PYPIRC)[](#l1.28)
cmd = self._cmd(self.dist)[](#l1.29)
cmd.repository = 'server3'[](#l1.30)
config = cmd._read_pypirc()[](#l1.31)
config = list(sorted(config.items()))[](#l1.33)
waited = [('password', 'yh^%#rest-of-my-password'), ('realm', 'pypi'),[](#l1.34)
('repository', 'https://pypi.python.org/pypi'),[](#l1.35)
('server', 'server3'), ('username', 'cbiggles')][](#l1.36)
self.assertEqual(config, waited)[](#l1.37)
+ + def test_suite(): return unittest.makeSuite(PyPIRCCommandTestCase)