Skip to content

Increase test coverage of gettext #130655

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
tomasr8 opened this issue Feb 27, 2025 · 6 comments
Open

Increase test coverage of gettext #130655

tomasr8 opened this issue Feb 27, 2025 · 6 comments
Assignees
Labels
tests Tests in the Lib/test dir triaged The issue has been accepted as valid by a triager.

Comments

@tomasr8
Copy link
Member

tomasr8 commented Feb 27, 2025

@StanFromIreland
Copy link
Contributor

I'll open a PR for find sometime tomorrow :-)

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 28, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 28, 2025
serhiy-storchaka pushed a commit that referenced this issue Feb 28, 2025
serhiy-storchaka pushed a commit that referenced this issue Feb 28, 2025
@encukou encukou added tests Tests in the Lib/test dir and removed docs Documentation in the Doc dir labels Feb 28, 2025
@picnixz picnixz added the triaged The issue has been accepted as valid by a triager. label Mar 1, 2025
encukou pushed a commit that referenced this issue Mar 19, 2025
@encukou
Copy link
Member

encukou commented Mar 19, 2025

Thanks for the tests!
Do you want to add more, or should this be closed?

@tomasr8
Copy link
Member Author

tomasr8 commented Mar 19, 2025

Up to you, IIRC there are some code paths related to parsing MO files which are also not covered. I was going to send a PR for that at some point, but that can also be done in a separate issue if you prefer to close this one.

colesbury pushed a commit to colesbury/cpython that referenced this issue Mar 20, 2025
@tomasr8 tomasr8 changed the title Increase test coverage of gettext.find and gettext._expand_lang Increase test coverage of gettext Mar 30, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Apr 4, 2025
…ed by `gettext` (pythonGH-131909)

(cherry picked from commit 16a6270)

Co-authored-by: Tomas R. <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Apr 4, 2025
…ed by `gettext` (pythonGH-131909)

(cherry picked from commit 16a6270)

Co-authored-by: Tomas R. <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Apr 4, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Apr 4, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Apr 4, 2025
(cherry picked from commit 3118693)

Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Tomas R. <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Apr 4, 2025
(cherry picked from commit 3118693)

Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Tomas R. <[email protected]>
picnixz pushed a commit that referenced this issue Apr 4, 2025
gh-130655: Add tests for `gettext.find()` (GH-130691)

(cherry picked from commit 3118693)

Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Tomas R. <[email protected]>
picnixz pushed a commit that referenced this issue Apr 4, 2025
gh-130655: Add tests for `gettext.find()` (GH-130691)

(cherry picked from commit 3118693)

Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Tomas R. <[email protected]>
picnixz pushed a commit that referenced this issue Apr 4, 2025
…sed by `gettext` (GH-131909) (#132077)

gh-130655: Add a test for bad magic numbers in `.mo` files parsed by `gettext` (GH-131909)
(cherry picked from commit 16a6270)

Co-authored-by: Tomas R <[email protected]>
picnixz pushed a commit that referenced this issue Apr 4, 2025
…sed by `gettext` (GH-131909) (#132078)

gh-130655: Add a test for bad magic numbers in `.mo` files parsed by `gettext` (GH-131909)
(cherry picked from commit 16a6270)

Co-authored-by: Tomas R <[email protected]>
picnixz pushed a commit that referenced this issue Apr 4, 2025
…-131911) (#132079)

gh-130655: Add a test for corrupt `.mo` files in `gettext` (GH-131911)
(cherry picked from commit a126cef)

Co-authored-by: Tomas R <[email protected]>
picnixz pushed a commit that referenced this issue Apr 4, 2025
…-131911) (#132080)

gh-130655: Add a test for corrupt `.mo` files in `gettext` (GH-131911)
(cherry picked from commit a126cef)

Co-authored-by: Tomas R <[email protected]>
@StanFromIreland
Copy link
Contributor

Coverage is now at 85%!

@StanFromIreland
Copy link
Contributor

StanFromIreland commented Apr 12, 2025

The test file should be split into a data file and a test file IMO, any thoughts on this? See POC #132442

@tomasr8
Copy link
Member Author

tomasr8 commented Apr 12, 2025

Coverage is now at 85%!

Soon to be 86% 😆 I have a test for big-endian MO files lying around somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir triaged The issue has been accepted as valid by a triager.
Projects
Status: No status
Status: Todo
Development

No branches or pull requests

4 participants