[Python-checkins] cpython (merge 3.5 -> default): Issue #20120: Merge from 3.5

berker.peksag python-checkins at python.org
Mon Jun 20 14:42:22 EDT 2016


https://hg.python.org/cpython/rev/703d9066c459
changeset:   102115:703d9066c459
parent:      102113:30b6cd2b3440
parent:      102114:83d731f01dde
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Mon Jun 20 21:42:05 2016 +0300
summary:
  Issue #20120: Merge from 3.5

files:
  Lib/distutils/tests/test_config.py |  19 ++++++++++++++++++
  1 files changed, 19 insertions(+), 0 deletions(-)


diff --git a/Lib/distutils/tests/test_config.py b/Lib/distutils/tests/test_config.py
--- a/Lib/distutils/tests/test_config.py
+++ b/Lib/distutils/tests/test_config.py
@@ -16,6 +16,7 @@
 index-servers =
     server1
     server2
+    server3
 
 [server1]
 username:me
@@ -26,6 +27,10 @@
 password: secret
 realm:acme
 repository:http://another.pypi/
+
+[server3]
+username:cbiggles
+password:yh^%#rest-of-my-password
 """
 
 PYPIRC_OLD = """\
@@ -111,6 +116,20 @@
         finally:
             f.close()
 
+    def test_config_interpolation(self):
+        # using the % character in .pypirc should not raise an error (#20120)
+        self.write_file(self.rc, PYPIRC)
+        cmd = self._cmd(self.dist)
+        cmd.repository = 'server3'
+        config = cmd._read_pypirc()
+
+        config = list(sorted(config.items()))
+        waited = [('password', 'yh^%#rest-of-my-password'), ('realm', 'pypi'),
+                  ('repository', 'https://pypi.python.org/pypi'),
+                  ('server', 'server3'), ('username', 'cbiggles')]
+        self.assertEqual(config, waited)
+
+
 def test_suite():
     return unittest.makeSuite(PyPIRCCommandTestCase)
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list