From 809608155d9b1df59b5bf4b1f13e4129201e6b85 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 13 Sep 2018 10:08:46 -0700 Subject: [PATCH] closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9262) (cherry picked from commit a710ebd21b09efe902dde84d4862ce5c6427f7af) Co-authored-by: Benjamin Peterson --- Lib/test/test_shutil.py | 2 ++ Misc/NEWS.d/next/Tests/2018-09-13-09-53-15.bpo-34661.bdTamP.rst | 1 + 2 files changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Tests/2018-09-13-09-53-15.bpo-34661.bdTamP.rst diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index 2cb2f14643e1b3..ee23ac8062832c 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -1124,6 +1124,8 @@ def test_unzip_zipfile(self): subprocess.check_output(zip_cmd, stderr=subprocess.STDOUT) except subprocess.CalledProcessError as exc: details = exc.output.decode(errors="replace") + if 'unrecognized option: t' in details: + self.skip("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 00000000000000..fc2b8e90ead505 --- /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.