closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9262)

This commit is contained in:
Benjamin Peterson 2018-09-13 10:08:46 -07:00 committed by GitHub
parent 53c427e839
commit a710ebd21b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -1181,6 +1181,8 @@ class TestShutil(unittest.TestCase):
subprocess.check_output(zip_cmd, stderr=subprocess.STDOUT) subprocess.check_output(zip_cmd, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as exc: except subprocess.CalledProcessError as exc:
details = exc.output.decode(errors="replace") 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{}" msg = "{}\n\n**Unzip Output**\n{}"
self.fail(msg.format(exc, details)) self.fail(msg.format(exc, details))

View File

@ -0,0 +1 @@
Fix test_shutil if unzip doesn't support -t.