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

Fix test_slash_l* to support non-en_US locales #141

Merged
merged 2 commits into from
Oct 28, 2023

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Apr 3, 2023

Description

Update the tests to expect the current locale rather than en_US. While technically this isn't 100% guaranteed to be the same locale as the database is running on, I think we can reasonably assume that for the purpose of testing they are the same. Non-UTF-8 locales still are not supported but the other tests seem to be unable to handle them well anyway.

Fixes #140

Checklist

  • I've added this contribution to the changelog.rst.
  • I installed pre-commit hooks (pip install pre-commit && pre-commit install), and ran black on my code.
  • Please squash merge this pull request (uncheck if you'd like us to merge as multiple commits)

Update the tests to expect the current locale rather than `en_US`.
While technically this isn't 100% guaranteed to be the same locale
as the database is running on, I think we can reasonably assume that
for the purpose of testing they are the same.  Non-UTF-8 locales
still are not supported but the other tests seem to be unable to handle
them well anyway.

Fixes dbcli#140
@mgorny
Copy link
Contributor Author

mgorny commented Apr 3, 2023

Damn, I knew this is going to happen — the Docker container is actually using a different locale than GHA environment. I'm going to try if I can set them to match.

@j-bennet j-bennet merged commit ee94b98 into dbcli:main Oct 28, 2023
@j-bennet
Copy link
Contributor

Thank you @mgorny.

@mgorny mgorny deleted the locale-test branch October 29, 2023 04:37
@mgorny
Copy link
Contributor Author

mgorny commented Oct 29, 2023

Thanks!

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

Successfully merging this pull request may close these issues.

tests/test_specials.py::test_slash_l* fail with non-en_US locale
2 participants