tests: run the Python suite on Windows #109

Merged
davutsimsekk merged 1 commit from upstream-pr/109 into main 2026-11-24 23:09:55 +00:00
davutsimsekk commented 2026-11-24 23:09:15 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by davutsimsekk on 2026-11-24T23:09:15Z.


The Python suite promised Windows support (merged #3) but three checks still fail on Windows:

  • tests/test_performance.py writes a UTF-8 BOM fixture without encoding="utf-8", so Path.write_text uses the locale encoding and raises UnicodeEncodeError before the BOM path is tested.
  • project_tuxbox/runtime_shaders.py opens the request file with POSIX-only os.O_NONBLOCK and os.O_NOFOLLOW; O_NOFOLLOW is also absent on Windows. Both become optional flags; the digest check still authenticates the contents.
  • tools/check_wide_atomic.py uses a Python 3.12-only nested same-quote f-string, while CONTRIBUTING.md and docs/PROJECTSCARLETT.md promise 3.10+. The two conditional declarations are now locals; generated HLSL is unchanged.

Test

python -m unittest discover -s tests -q: 205 tests, OK (59 skipped) on Windows 3.11.9.
python -m py_compile tools/check_wide_atomic.py: passes on 3.11.

No game data or GPU was used.

<!-- greyfinch-sync:brcly/TuxBox:issue:6593257200 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/109). Originally posted by [davutsimsekk](https://github.com/davutsimsekk) on 2026-11-24T23:09:15Z. --- The Python suite promised Windows support (merged #3) but three checks still fail on Windows: - `tests/test_performance.py` writes a UTF-8 BOM fixture without `encoding="utf-8"`, so `Path.write_text` uses the locale encoding and raises `UnicodeEncodeError` before the BOM path is tested. - `project_tuxbox/runtime_shaders.py` opens the request file with POSIX-only `os.O_NONBLOCK` and `os.O_NOFOLLOW`; `O_NOFOLLOW` is also absent on Windows. Both become optional flags; the digest check still authenticates the contents. - `tools/check_wide_atomic.py` uses a Python 3.12-only nested same-quote f-string, while `CONTRIBUTING.md` and `docs/PROJECTSCARLETT.md` promise 3.10+. The two conditional declarations are now locals; generated HLSL is unchanged. ## Test `python -m unittest discover -s tests -q`: **205 tests, OK (59 skipped)** on Windows 3.11.9. `python -m py_compile tools/check_wide_atomic.py`: passes on 3.11. No game data or GPU was used.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
brcly/TuxBox!109
No description provided.