]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9262)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 13 Sep 2018 17:32:44 +0000 (10:32 -0700)
committerGitHub <noreply@github.com>
Thu, 13 Sep 2018 17:32:44 +0000 (10:32 -0700)
(cherry picked from commit a710ebd21b09efe902dde84d4862ce5c6427f7af)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
Lib/test/test_shutil.py
Misc/NEWS.d/next/Tests/2018-09-13-09-53-15.bpo-34661.bdTamP.rst [new file with mode: 0644]

index 588e7d27941cc1ccdb60f8fa6d6af9b37487ac3d..8b5c35ae9ad541a41103f1a9215b49731b11dad1 100644 (file)
@@ -1127,6 +1127,8 @@ class TestShutil(unittest.TestCase):
                 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 (file)
index 0000000..fc2b8e9
--- /dev/null
@@ -0,0 +1 @@
+Fix test_shutil if unzip doesn't support -t.