summaryrefslogtreecommitdiff
path: root/Lib/distutils/tests
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-06-10 23:02:04 +0300
committerBerker Peksag <berker.peksag@gmail.com>2016-06-10 23:02:04 +0300
commitb67f275e18dfa603ddf019e296161b06fd541906 (patch)
tree6f0bef3643a0fe831f99e2f85f3955d0ee6c1b21 /Lib/distutils/tests
parent8b181a95597c521835b5701d1d9c91d712375b68 (diff)
parent10a1074a40e74dcc88ee861e6db8bdd9adbcf9d0 (diff)
downloadcpython-b67f275e18dfa603ddf019e296161b06fd541906.tar.gz
Issue #20900: Merge from 3.5
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r--Lib/distutils/tests/test_register.py14
-rw-r--r--Lib/distutils/tests/test_upload.py2
2 files changed, 15 insertions, 1 deletions
diff --git a/Lib/distutils/tests/test_register.py b/Lib/distutils/tests/test_register.py
index 6180133994..01acf2375f 100644
--- a/Lib/distutils/tests/test_register.py
+++ b/Lib/distutils/tests/test_register.py
@@ -301,6 +301,20 @@ class RegisterTestCase(PyPIRCCommandTestCase):
results = self.get_logs(INFO)
self.assertEqual(results, ['running check', 'xxx'])
+ def test_show_response(self):
+ # test that the --show-response option return a well formatted response
+ cmd = self._get_cmd()
+ inputs = Inputs('1', 'tarek', 'y')
+ register_module.input = inputs.__call__
+ cmd.show_response = 1
+ try:
+ cmd.run()
+ finally:
+ del register_module.input
+
+ results = self.get_logs(INFO)
+ self.assertEqual(results[3], 75 * '-' + '\nxxx\n' + 75 * '-')
+
def test_suite():
return unittest.makeSuite(RegisterTestCase)
diff --git a/Lib/distutils/tests/test_upload.py b/Lib/distutils/tests/test_upload.py
index 19193d5b05..964aac7e80 100644
--- a/Lib/distutils/tests/test_upload.py
+++ b/Lib/distutils/tests/test_upload.py
@@ -140,7 +140,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
# The PyPI response body was echoed
results = self.get_logs(INFO)
- self.assertIn('xyzzy\n', results[-1])
+ self.assertEqual(results[-1], 75 * '-' + '\nxyzzy\n' + 75 * '-')
def test_upload_fails(self):
self.next_msg = "Not Found"