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

tools: allow test tap output to include Unicode characters #47175

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

MoLow
Copy link
Member

@MoLow MoLow commented Mar 20, 2023

Fixes #47173

the issue can be easily reproduced locally by adding sys.stdout.reconfigure(encoding='ascii') to the beginning of tools/test.py

@nodejs-github-bot nodejs-github-bot added test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory. labels Mar 20, 2023
@MoLow
Copy link
Member Author

MoLow commented Mar 20, 2023

CC @nodejs/python @richardlau

@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 20, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 20, 2023
@nodejs-github-bot
Copy link
Collaborator

@targos targos added the fast-track PRs that do not need to wait for 48 hours to land. label Mar 20, 2023
@richardlau
Copy link
Member

Well this doesn't look quite right 😆:
https://ci.nodejs.org/job/node-test-commit-osx/51087/nodes=osx1015/console

17:24:54 b'ok 2119 parallel/test-readline-async-iterators'
17:24:54   ---
17:24:54   duration_ms: 10.526
17:24:54   ...
17:24:55 b'ok 2120 parallel/test-repl-history-perm'
17:24:55   ---
17:24:55   duration_ms: 0.118
17:24:55   ...

Note the "b" prefix and single quotes. This results in:
https://ci.nodejs.org/job/node-test-commit-osx/51087/nodes=osx1015/
image

Copy link
Contributor

@cclauss cclauss left a comment

Choose a reason for hiding this comment

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

If you want the second representation (b'L\xc3\xbcsai') instead of the first (Lüsai) then I approve.

>>> import logging
>>> logger = logging.getLogger()
>>> logger.warning("Lüsai")
Lüsai
>>> logger.warning("Lüsai".encode("utf-8"))
b'L\xc3\xbcsai'

Copy link
Member

@richardlau richardlau left a comment

Choose a reason for hiding this comment

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

@cclauss cclauss changed the title tools: allow test tap output to include unicode characters tools: allow test tap output to include Unicode characters Mar 20, 2023
@cclauss cclauss self-requested a review March 20, 2023 18:13
@MoLow MoLow added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 21, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 21, 2023
@nodejs-github-bot
Copy link
Collaborator

@MoLow MoLow requested a review from richardlau March 21, 2023 08:02
@nodejs-github-bot
Copy link
Collaborator

@nodejs nodejs deleted a comment from github-actions bot Mar 21, 2023
@MoLow MoLow added fast-track PRs that do not need to wait for 48 hours to land. and removed fast-track PRs that do not need to wait for 48 hours to land. labels Mar 21, 2023
@github-actions
Copy link
Contributor

Fast-track has been requested by @MoLow. Please 👍 to approve.

@MoLow MoLow added the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 21, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 21, 2023
@nodejs-github-bot nodejs-github-bot merged commit f5eedf4 into nodejs:main Mar 21, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in f5eedf4

@MoLow MoLow deleted the allow-tap-to-include-utf branch March 21, 2023 17:28
RafaelGSS pushed a commit that referenced this pull request Apr 5, 2023
PR-URL: #47175
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
@RafaelGSS RafaelGSS mentioned this pull request Apr 6, 2023
RafaelGSS pushed a commit that referenced this pull request Apr 7, 2023
PR-URL: #47175
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
PR-URL: #47175
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fast-track PRs that do not need to wait for 48 hours to land. test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pseudo-tty/test_runner_default_reporter breaks Python based test runner
5 participants