]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[2.7] closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9267)
authorBenjamin Peterson <benjamin@python.org>
Thu, 13 Sep 2018 18:24:07 +0000 (11:24 -0700)
committerGitHub <noreply@github.com>
Thu, 13 Sep 2018 18:24:07 +0000 (11:24 -0700)
(cherry picked from commit a710ebd21b09efe902dde84d4862ce5c6427f7af)

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