Skip to content

Commit 461c12b

Browse files
authored
gh-116622: Make test_unzip_zipfile recognize Android error message format (#124462)
Make test_unzip_zipfile recognize Android error message format
1 parent 8447c93 commit 461c12b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_shutil.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1909,7 +1909,10 @@ def test_unzip_zipfile(self):
19091909
subprocess.check_output(zip_cmd, stderr=subprocess.STDOUT)
19101910
except subprocess.CalledProcessError as exc:
19111911
details = exc.output.decode(errors="replace")
1912-
if 'unrecognized option: t' in details:
1912+
if any(message in details for message in [
1913+
'unrecognized option: t', # BusyBox
1914+
'invalid option -- t', # Android
1915+
]):
19131916
self.skipTest("unzip doesn't support -t")
19141917
msg = "{}\n\n**Unzip Output**\n{}"
19151918
self.fail(msg.format(exc, details))

0 commit comments

Comments
 (0)