https://github.com/python/cpython/commit/0a57fe3a7d4047e07f5f393a25b7c6d5db466004
commit: 0a57fe3a7d4047e07f5f393a25b7c6d5db466004
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: Yhg1s <[email protected]>
date: 2024-09-29T18:03:12-07:00
summary:

[3.13] gh-116622: Make test_unzip_zipfile recognize Android error message 
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 461c12b43870d51ea29eae7b0969b20565d50eb6)

Co-authored-by: Malcolm Smith <[email protected]>

files:
M Lib/test/test_shutil.py

diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index bccb81e0737c57..91239ce2d95017 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -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))

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to