]> granicus.if.org Git - python/commitdiff
closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9262)
authorBenjamin Peterson <benjamin@python.org>
Thu, 13 Sep 2018 17:08:46 +0000 (10:08 -0700)
committerGitHub <noreply@github.com>
Thu, 13 Sep 2018 17:08:46 +0000 (10:08 -0700)
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 7e0a3292e0f8a4697e59516d835c7b0ad4f96e33..797228db4d5156fe025079da1b990a0613c5aa24 100644 (file)
@@ -1181,6 +1181,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.