diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-06-20 21:42:05 +0300 |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-06-20 21:42:05 +0300 |
commit | 92b641b21db87db3ee37c0a7de8b7b5e0b399cba (patch) | |
tree | dbf735d86930c8db92a1efeb70b67b741f49e049 | |
parent | cb19a1823810d0b3589c00b2fdd7e8f23082cc3f (diff) | |
parent | 32821f0c7684148df899f79932c2e138c3ace6f5 (diff) | |
download | python-setuptools-git-92b641b21db87db3ee37c0a7de8b7b5e0b399cba.tar.gz |
Issue #20120: Merge from 3.5
-rw-r--r-- | tests/test_config.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index d91dedd3..1aacb73a 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -16,6 +16,7 @@ PYPIRC = """\ index-servers = server1 server2 + server3 [server1] username:me @@ -26,6 +27,10 @@ username:meagain password: secret realm:acme repository:http://another.pypi/ + +[server3] +username:cbiggles +password:yh^%#rest-of-my-password """ PYPIRC_OLD = """\ @@ -111,6 +116,20 @@ class PyPIRCCommandTestCase(support.TempdirManager, 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) |