Skip to content

Commit a553651

Browse files
mhsmithmiss-islington
authored andcommitted
pythongh-116622: Make test_unzip_zipfile recognize Android error message format (pythonGH-124462)
Make test_unzip_zipfile recognize Android error message format (cherry picked from commit 461c12b) Co-authored-by: Malcolm Smith <[email protected]>
1 parent 2f25d85 commit a553651

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_shutil.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1911,7 +1911,10 @@ def test_unzip_zipfile(self):
19111911
subprocess.check_output(zip_cmd, stderr=subprocess.STDOUT)
19121912
except subprocess.CalledProcessError as exc:
19131913
details = exc.output.decode(errors="replace")
1914-
if 'unrecognized option: t' in details:
1914+
if any(message in details for message in [
1915+
'unrecognized option: t', # BusyBox
1916+
'invalid option -- t', # Android
1917+
]):
19151918
self.skipTest("unzip doesn't support -t")
19161919
msg = "{}\n\n**Unzip Output**\n{}"
19171920
self.fail(msg.format(exc, details))

0 commit comments

Comments
 (0)