Skip to content

Commit

Permalink
gh-116622: Make test_unzip_zipfile recognize Android error message fo…
Browse files Browse the repository at this point in the history
…rmat (#124462)

Make test_unzip_zipfile recognize Android error message format
  • Loading branch information
mhsmith authored Sep 25, 2024
1 parent 8447c93 commit 461c12b
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 @@ -1909,7 +1909,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 461c12b

Please sign in to comment.