summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalcolm Smith <smith@chaquo.com>2024-09-25 14:02:18 (GMT)
committerGitHub <noreply@github.com>2024-09-25 14:02:18 (GMT)
commit461c12b43870d51ea29eae7b0969b20565d50eb6 (patch)
treeda1e0619b6bb0cc94f81c0a353e70973f61c20df
parent8447c933da308939b06e33544ca9abc9fc46aa8b (diff)
downloadcpython-461c12b43870d51ea29eae7b0969b20565d50eb6.zip
cpython-461c12b43870d51ea29eae7b0969b20565d50eb6.tar.gz
cpython-461c12b43870d51ea29eae7b0969b20565d50eb6.tar.bz2
gh-116622: Make test_unzip_zipfile recognize Android error message format (#124462)
Make test_unzip_zipfile recognize Android error message format
-rw-r--r--Lib/test/test_shutil.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index 80e1d73..37e54d2 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -1909,7 +1909,10 @@ class TestArchives(BaseTest, unittest.TestCase):
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))