Skip to content

Make audit_translations tests pass on Windows - #893

Merged
moritz-gross merged 1 commit into
daisy:mainfrom
dkager:fix/audit-tests-windows
Oct 24, 2026
Merged

moritz-gross merged 1 commit into
daisy:mainfrom
dkager:fix/audit-tests-windows

Conversation

@dkager

@dkager dkager commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

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_translations fail on Windows. On Linux (CI) they pass. This makes them platform-independent:

  • get_yaml_files sorted Path objects directly. WindowsPath compares case-insensitively, so on Windows definitions.yaml came before SharedRules/definitions.yaml (also in the audit output). It now sorts by p.parts, which is case-sensitive everywhere. The order on Linux is unchanged.
  • Rich golden test: rich's legacy Windows rendering replaces the rounded box corners (╭ → ┌). The test now turns legacy_windows off (and restores it), as it already does for the console width.
  • Subprocess test: the child's output contains characters like ≠ 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 check and ruff format --check are clean.

🤖 Generated with Claude Code

- 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>
@moritz-gross

Copy link
Copy Markdown
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.

@moritz-gross
moritz-gross merged commit f122be5 into daisy:main Oct 24, 2026
@github-project-automation github-project-automation Bot moved this from Triage to Done in MathCAT Project Board Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants