FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-116622: Make test_unzip_zipfile recognize Android error message format by mhsmith · Pull Request #124462 · python/cpython · GitHub

/ cpython Public

gh-116622: Make test_unzip_zipfile recognize Android error message format - #124462

Merged
freakboy3742 merged 3 commits into
python:mainfrom
mhsmith:android-unzip
Sep 25, 2024
Merged

gh-116622: Make test_unzip_zipfile recognize Android error message format#124462
freakboy3742 merged 3 commits into
python:mainfrom
mhsmith:android-unzip

Conversation

mhsmith commented Sep 24, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

The test expects the format unrecognized option: t, but the Android message is invalid option -- t.

This only failed in a fairly narrow range of Android versions including API level 30. Older versions didn't include an unzip command at all, and newer versions included a version that supports the -t option.

Comment thread Lib/test/test_shutil.py Outdated
except subprocess.CalledProcessError as exc:
details = exc.output.decode(errors="replace")
if 'unrecognized option: t' in details:
if re.search(r'(unrecognized|invalid) option(:| --) t', details):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

While this regex works, I think it would be better to be explicit about the 2 forms of the message that we know exist, rather than try to catch all possible variations and combinations. My experience has been that tests that try t be "smart" have a nasty habit of biting you when you least expect it.

bedevere-app Bot commented Sep 24, 2024

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

mhsmith commented Sep 25, 2024

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again.

bedevere-app Bot commented Sep 25, 2024

Copy link
Copy Markdown

Thanks for making the requested changes!

@freakboy3742: please review the changes made to this pull request.

bedevere-app Bot requested a review from freakboy3742 September 25, 2024 12:20

freakboy3742 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

👍

freakboy3742 merged commit 461c12b into python:main Sep 25, 2024

Copy link
Copy Markdown

Thanks @mhsmith for the PR, and @freakboy3742 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 25, 2024
…age format (pythonGH-124462)

Make test_unzip_zipfile recognize Android error message format
(cherry picked from commit 461c12b)

Co-authored-by: Malcolm Smith <smith@chaquo.com>

bedevere-app Bot commented Sep 25, 2024

Copy link
Copy Markdown

GH-124516 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Sep 25, 2024
Yhg1s pushed a commit that referenced this pull request Sep 30, 2024
…sage 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 461c12b)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL