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

Add test for utf-8 encoding of stdout/err #8

Merged
merged 3 commits into from
Dec 4, 2022
Merged

Add test for utf-8 encoding of stdout/err #8

merged 3 commits into from
Dec 4, 2022

Conversation

freakboy3742
Copy link
Member

beeware/briefcase-macOS-Xcode-template#18 identified that macOS apps weren't being started with the correct system encoding. This PR adds a test case to verify this encoding.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@freakboy3742
Copy link
Member Author

freakboy3742 commented Dec 1, 2022

Three review notes:

  1. This PR extends the test-mode PR, so it shouldn't be merged until that PR is merged.
  2. We have a chicken-and-egg problem with testing. This PR requires updated platform templates to pass CI; testing those templates requires this PR to add the test. At least for now, the templates aren't running test suites, but this is something we should consider.
  3. This reveals that the problem fixed by Set utf-8 mode during Python initialisation briefcase-macOS-Xcode-template#18 also exists on other platforms.

As a result of (3), the test suite isn't green; however, once the PRs have been merged (and in the case of -app templates, the binaries are rebuilt), it should be possible to re-run the failed tests and get a green status:

I've updated this templates as well to ensure that UTF-8 is being honored. These weren't causing test failures, but that appears to be cause the CI environment is using UTF-8 as the default encoding:

The Windows and Android templates already enable UTF-8 mode.

I've added beeware/briefcase#985 to ensure that briefcase dev uses UTF-8 mode. This is required to make the test suite pass on Windows with a CP-1252 locale.

tests/test_linux.py Show resolved Hide resolved
Base automatically changed from test-mode to main December 4, 2022 23:31
@freakboy3742 freakboy3742 merged commit 9d13870 into main Dec 4, 2022
@freakboy3742 freakboy3742 deleted the utf-8 branch December 4, 2022 23:31
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.

3 participants