[Python-checkins] [2.7] closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9267)

Benjamin Peterson webhook-mailer at python.org
Thu Sep 13 14:24:10 EDT 2018


https://github.com/python/cpython/commit/18e21883a4ec2a36a02054eb2ff47e3ba9bd1d33
commit: 18e21883a4ec2a36a02054eb2ff47e3ba9bd1d33
branch: 2.7
author: Benjamin Peterson <benjamin at python.org>
committer: GitHub <noreply at github.com>
date: 2018-09-13T11:24:07-07:00
summary:

[2.7] closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9267)

(cherry picked from commit a710ebd21b09efe902dde84d4862ce5c6427f7af)

files:
A Misc/NEWS.d/next/Tests/2018-09-13-09-53-15.bpo-34661.bdTamP.rst
M Lib/test/test_shutil.py

diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index 8338712da2b7..ca89fe509b23 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -543,6 +543,8 @@ def test_unzip_zipfile(self):
                 subprocess.check_output(zip_cmd, stderr=subprocess.STDOUT)
             except subprocess.CalledProcessError as exc:
                 details = exc.output
+                if 'unrecognized option: t' in details:
+                    self.skipTest("unzip doesn't support -t")
                 msg = "{}\n\n**Unzip Output**\n{}"
                 self.fail(msg.format(exc, details))
 
diff --git a/Misc/NEWS.d/next/Tests/2018-09-13-09-53-15.bpo-34661.bdTamP.rst b/Misc/NEWS.d/next/Tests/2018-09-13-09-53-15.bpo-34661.bdTamP.rst
new file mode 100644
index 000000000000..fc2b8e90ead5
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2018-09-13-09-53-15.bpo-34661.bdTamP.rst
@@ -0,0 +1 @@
+Fix test_shutil if unzip doesn't support -t.



More information about the Python-checkins mailing list