Skip to content

gh-130197: Improve test coverage of msgfmt.py #133048

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tomasr8
Copy link
Member

@tomasr8 tomasr8 commented Apr 27, 2025

I am using #130197 for this because it relates to #131381

The current msgfmt parser is not fully compliant and has several bugs despite a few having been fixed already. The parser code is also not very maintainable in its current form so I'd like to modernize it and make it more reliable. A reliable PO parser will also be useful for the --exclude-file option in pygettext (see #131381).

Before we make any sweeping changes, I want to first increase the test coverage which is currently really low. This will help us document the discrepancies of the current parser and ensure we don't regress when we update the parser later on.

This is just the first PR which adds string tests. More PRs will follow to test other parts of the PO parser.

@bedevere-app bedevere-app bot added awaiting review tests Tests in the Lib/test dir labels Apr 27, 2025
@bedevere-app bedevere-app bot mentioned this pull request Apr 27, 2025
18 tasks
@tomasr8
Copy link
Member Author

tomasr8 commented Apr 27, 2025

Do you think you could have a look Serhiy?

Copy link

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

the tests looks good on first review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants