Skip to content

Commit

Permalink
[3.13] gh-116622: Make test_unzip_zipfile recognize Android error mes…
Browse files Browse the repository at this point in the history
…sage format (GH-124462) (#124516)

gh-116622: Make test_unzip_zipfile recognize Android error message format (GH-124462)

Make test_unzip_zipfile recognize Android error message format
(cherry picked from commit 461c12b)

Co-authored-by: Malcolm Smith <[email protected]>
  • Loading branch information
miss-islington and mhsmith authored Sep 30, 2024
1 parent 62f691f commit 0a57fe3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib/test/test_shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,10 @@ 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:
if any(message in details for message in [
'unrecognized option: t', # BusyBox
'invalid option -- t', # Android
]):
self.skipTest("unzip doesn't support -t")
msg = "{}\n\n**Unzip Output**\n{}"
self.fail(msg.format(exc, details))
Expand Down

0 comments on commit 0a57fe3

Please sign in to comment.