Repository navigation
Make audit_translations tests pass on Windows - #893
Merged
Merged
Conversation
- get_yaml_files: sort by path parts so the order is case-sensitive on every platform (WindowsPath compares case-insensitively, so definitions.yaml came before SharedRules/definitions.yaml on Windows) - rich golden test: turn off rich's legacy Windows rendering, which replaces the rounded box corners - subprocess test: use UTF-8 for the child's output and for reading it, since the output contains characters like "≠" that Windows code pages lack Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
looks good, thanks for pointing that out and fixing it directly. I'll add testing on Windows to the CI pipleline, so that this won't happen again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The following is a legitimate, human-reviewed effort to fix some more problems in the tooling on Windows. It is, however, also me exploring the opportunities of AI-assisted coding, hence the disclaimer at the end. I feel I need to be transparent about this.
Three tests in
PythonScripts/audit_translationsfail on Windows. On Linux (CI) they pass. This makes them platform-independent:get_yaml_filessortedPathobjects directly.WindowsPathcompares case-insensitively, so on Windowsdefinitions.yamlcame beforeSharedRules/definitions.yaml(also in the audit output). It now sorts byp.parts, which is case-sensitive everywhere. The order on Linux is unchanged.╭→┌). The test now turnslegacy_windowsoff (and restores it), as it already does for the console width.≠that Windows code pages lack. The test now uses UTF-8 for the child's output and for reading it.Tested on Windows: 139 passed, and
ruff checkandruff format --checkare clean.🤖 Generated with Claude Code