Skip to content

Specify utf-8 encoding when reading module source files - #329

Merged
oxesoft merged 2 commits into
v2.16-developfrom
fix/issue-323-missing-encoding
Jun 2, 2026
Merged

Specify utf-8 encoding when reading module source files#329
oxesoft merged 2 commits into
v2.16-developfrom
fix/issue-323-missing-encoding

Conversation

@oxesoft

@oxesoft oxesoft commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add encoding=\"utf-8\" to the open() call in list_python_tests_classes.py so module source parsing does not depend on the platform's default locale.

Fixes #323

Test plan

  • Existing tests still pass

🤖 Generated with Claude Code

Avoids reliance on the platform default locale when parsing
imported module sources for matter base test class detection.

Fixes #323

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the file reading logic in list_python_tests_classes.py to explicitly use UTF-8 encoding. The reviewer suggested a cleaner implementation using Path.read_text(encoding="utf-8") to avoid the nested with block.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@oxesoft
oxesoft requested a review from rquidute June 2, 2026 16:27
@oxesoft
oxesoft merged commit 2b8532e into v2.16-develop Jun 2, 2026
5 of 9 checks passed
@oxesoft
oxesoft deleted the fix/issue-323-missing-encoding branch June 2, 2026 19:46
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.

2 participants