Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-126413: Add translation tests for getopt and optparse #126698

Merged
merged 5 commits into from
Nov 11, 2024

Conversation

tomasr8
Copy link
Member

@tomasr8 tomasr8 commented Nov 11, 2024

This is a followup from #124295

Given that the tests for getopt and optparse are essentially the same as the ones for argparse, I extracted the snapshot file generation and comparison into test.support.i18n_helper in order not to repeat the code three times. The majority of the diff is just moving that code from test_argpase to test.support.i18n_helper.

Just like for argparse, the snapshots are generated in Lib/test/translationdata and are updated the same way using --snapshot-update.

@tomasr8
Copy link
Member Author

tomasr8 commented Nov 11, 2024

Not entirely sure if this needs a news entry, adding skip news for now just to see if the CI turns green

@erlend-aasland
Copy link
Contributor

Not entirely sure if this needs a news entry, adding skip news for now just to see if the CI turns green

I think we can skip NEWS for test improvements.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. 👍

@serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Nov 11, 2024
@serhiy-storchaka serhiy-storchaka merged commit dff074d into python:main Nov 11, 2024
44 checks passed
@miss-islington-app
Copy link

Thanks @tomasr8 for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @tomasr8 and @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker dff074d1446bab23578a6b228b0c59a17006299c 3.13

@miss-islington-app
Copy link

Sorry, @tomasr8 and @serhiy-storchaka, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker dff074d1446bab23578a6b228b0c59a17006299c 3.12

@tomasr8 tomasr8 deleted the getopt-tests branch November 11, 2024 23:10
@tomasr8
Copy link
Member Author

tomasr8 commented Nov 11, 2024

Thanks for the review! I'll deal with the backports tomorrow :)

tomasr8 added a commit to tomasr8/cpython that referenced this pull request Nov 12, 2024
@bedevere-app
Copy link

bedevere-app bot commented Nov 12, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Nov 12, 2024
@bedevere-app
Copy link

bedevere-app bot commented Nov 12, 2024

GH-126756 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Nov 12, 2024
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.

3 participants