Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
freakboy3742 merged 3 commits intopython:mainfrommhsmith:android-unzip
Sep 25, 2024

Conversation

mhsmith
Copy link
Member

@mhsmithmhsmith commentedSep 24, 2024
edited by bedevere-appbot
Loading

The test expects the formatunrecognized option: t, but the Android message isinvalid 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.

@@ -1909,7 +1910,7 @@ 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' indetails:
ifre.search(r'(unrecognized|invalid) option(:| --) t',details):
Copy link
Contributor

Choose a reason for hiding this comment

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

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
Copy link

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 phraseI 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
Copy link
MemberAuthor

I have made the requested changes; please review again.

@bedevere-app
Copy link

Thanks for making the requested changes!

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

Copy link
Contributor

@freakboy3742freakboy3742 left a comment

Choose a reason for hiding this comment

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

👍

@freakboy3742freakboy3742 merged commit461c12b intopython:mainSep 25, 2024
33 of 34 checks passed
@miss-islington-app
Copy link

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 requestSep 25, 2024
…age format (pythonGH-124462)Make test_unzip_zipfile recognize Android error message format(cherry picked from commit461c12b)Co-authored-by: Malcolm Smith <smith@chaquo.com>
@bedevere-app
Copy link

GH-124516 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelSep 25, 2024
Yhg1s pushed a commit that referenced this pull requestSep 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 commit461c12b)Co-authored-by: Malcolm Smith <smith@chaquo.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@freakboy3742freakboy3742freakboy3742 approved these changes

Assignees
No one assigned
Labels
skip newstestsTests in the Lib/test dir
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@mhsmith@freakboy3742

[8]ページ先頭

©2009-2025 Movatter.jp