diff options
author | Paul Ganssle <paul@ganssle.io> | 2018-11-07 17:07:58 -0500 |
---|---|---|
committer | Paul Ganssle <paul@ganssle.io> | 2018-11-07 17:38:44 -0500 |
commit | fe2c9e4292699635c91174bc049aefe81bf6116c (patch) | |
tree | 58ef477473868e95edeabb62d76da5bc6953b2fe /setuptools/tests | |
parent | 727dd60f6a11f38d165250c543ba135687fa2e61 (diff) | |
download | external_python_setuptools-fe2c9e4292699635c91174bc049aefe81bf6116c.tar.gz external_python_setuptools-fe2c9e4292699635c91174bc049aefe81bf6116c.tar.bz2 external_python_setuptools-fe2c9e4292699635c91174bc049aefe81bf6116c.zip |
Fix show_response behavior on Python 2
The `upload.show_response` feature was not added until Python 3. Rather
than backport it, it is now enabled only if supported.
This also adds a "smoke test" for the feature.
Diffstat (limited to 'setuptools/tests')
-rw-r--r-- | setuptools/tests/test_upload.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index 7bf8e312..319ed7a2 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -223,3 +223,12 @@ class TestUploadTest: assert entries['comment'].startswith(u'built for') assert len(entries['comment']) > len(u'built for') + def test_show_response_no_error(self, patched_upload): + # This test is just that show_response doesn't throw an error + # It is not really important what the printed response looks like + # in a deprecated command, but we don't want to introduce new + # errors when importing this function from distutils + + patched_upload.cmd.show_response = True + patched_upload.cmd.ensure_finalized() + patched_upload.cmd.run() |