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 crashing unicode Travis tests on Windows and fail build if Windows tests fail #836

Merged
merged 1 commit into from Feb 8, 2020
Merged

Fix crashing unicode Travis tests on Windows and fail build if Windows tests fail #836

merged 1 commit into from Feb 8, 2020

Conversation

micahellison
Copy link
Member

In Travis Windows machines, if any unicode is displayed in the console, the program crashes with the following error:

Exception UnicodeEncodeError: 'charmap' codec can't encode characters in position 6-69: character maps to <undefined>

Tests from PR #824 have verbose definitions for pretty print, which is full of interesting unicode characters. Unfortunately, not even the @skip_win directive can bypass this problem.

This can be reproduced on a local Windows machine by piping the output to a file, like so:

poetry run behave > testoutput.txt

The solution is to set the PYTHONIOENCODING variable to UTF-8 as documented here.

Now that these tests and all others are (hopefully) working in Windows, this PR also will fail the whole build if Windows tests fail.

Checklist

  • The code change is tested and works locally.
  • Tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • [n/a] Have you written new tests for your core changes, as applicable?

@micahellison micahellison added the build Issues related to the build pipeline label Feb 8, 2020
Copy link
Member

@wren wren left a comment

Choose a reason for hiding this comment

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

🌬 🔥

@wren wren merged commit 40b330e into jrnl-org:develop Feb 8, 2020
@micahellison micahellison mentioned this pull request Feb 8, 2020
6 tasks
wren pushed a commit that referenced this pull request Apr 18, 2020
@lock
Copy link

lock bot commented May 20, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the 🔒 Outdated label May 20, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build Issues related to the build pipeline 🔒 Outdated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants