mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[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 461c12b438
)
Co-authored-by: Malcolm Smith <smith@chaquo.com>
This commit is contained in:
parent
62f691f3d1
commit
0a57fe3a7d
1 changed files with 4 additions and 1 deletions
|
@ -1911,7 +1911,10 @@ class TestArchives(BaseTest, unittest.TestCase):
|
||||||
subprocess.check_output(zip_cmd, stderr=subprocess.STDOUT)
|
subprocess.check_output(zip_cmd, stderr=subprocess.STDOUT)
|
||||||
except subprocess.CalledProcessError as exc:
|
except subprocess.CalledProcessError as exc:
|
||||||
details = exc.output.decode(errors="replace")
|
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")
|
self.skipTest("unzip doesn't support -t")
|
||||||
msg = "{}\n\n**Unzip Output**\n{}"
|
msg = "{}\n\n**Unzip Output**\n{}"
|
||||||
self.fail(msg.format(exc, details))
|
self.fail(msg.format(exc, details))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue