tests: skip the Linux-only launcher tests on Windows #331

Merged
KainanP merged 1 commit from upstream-pr/331 into main 2026-11-28 01:15:15 +00:00
KainanP commented 2026-11-27 21:17:05 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by KainanP on 2026-11-27T21:17:05Z.


Summary

python -m unittest discover -s tests -q fails on Windows on main (62c7e39) with 1 failure and 17 errors. All of them test code that runs only on Linux:

Tests Cause on Windows
test_refusal_reasons (CachedRefusalReasons, StrideTableRetry, 7 tests) compile_request takes runtime_shaders.compile_lock, which uses fcntl
test_runtime_cache_retention (7 tests) mark_in_use and locked_by_another_launcher use fcntl
test_host.OfflineLaunch (2 tests) Host("wine", …) raises "The Wine and Proton backends require Linux"
test_shader_prep.ShaderLaunch.test_scarlett_skips_pregame_compilation ProjectScarlett launches only offline, which needs Linux
test_shader_pack.ScarlettPreparationOptions.test_prep_jobs_defaults_and_bounds os.sched_getaffinity does not exist, so patch cannot replace it

The first four are skipped off Linux with @unittest.skipUnless(sys.platform == "linux", …), as the suite already does for other Proton-only tests (test_runtime_shader_links, test_pipeline_prep, SeedShaderCache). The last one isn't skipped: prep_jobs already falls back to os.cpu_count() where sched_getaffinity is missing, so the test now patches with create=True and runs on Windows too. Nothing changes on Linux or in CI.

I reported these in #313.

Tested

  • The checks relevant to this change passed: tests only, no GPU checks apply.
  • Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below: no behaviour change; this is the unit suite itself.
  • Where the table calls for AMD and NVIDIA, they passed on both: not applicable.

GPU, driver and backend: none needed. Windows 11 Home 10.0.26200, Python 3.12.10, console code page cp1252 (PYTHONUTF8 unset).

Commands run and their results:

python -m unittest discover -s tests -q
  main (62c7e39): Ran 483 tests  FAILED (failures=1, errors=17, skipped=140)
  this branch:    Ran 483 tests  OK (skipped=162)

AI use: Claude Code (an AI coding agent) found the causes, wrote the change, and ran the suite above.

🤖 Generated with Claude Code

<!-- greyfinch-sync:brcly/TuxBox:issue:5533205815 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/331). Originally posted by [KainanP](https://github.com/KainanP) on 2026-11-27T21:17:05Z. --- ## Summary `python -m unittest discover -s tests -q` fails on Windows on `main` (62c7e39) with 1 failure and 17 errors. All of them test code that runs only on Linux: | Tests | Cause on Windows | |---|---| | `test_refusal_reasons` (`CachedRefusalReasons`, `StrideTableRetry`, 7 tests) | `compile_request` takes `runtime_shaders.compile_lock`, which uses `fcntl` | | `test_runtime_cache_retention` (7 tests) | `mark_in_use` and `locked_by_another_launcher` use `fcntl` | | `test_host.OfflineLaunch` (2 tests) | `Host("wine", …)` raises "The Wine and Proton backends require Linux" | | `test_shader_prep.ShaderLaunch.test_scarlett_skips_pregame_compilation` | ProjectScarlett launches only offline, which needs Linux | | `test_shader_pack.ScarlettPreparationOptions.test_prep_jobs_defaults_and_bounds` | `os.sched_getaffinity` does not exist, so `patch` cannot replace it | The first four are skipped off Linux with `@unittest.skipUnless(sys.platform == "linux", …)`, as the suite already does for other Proton-only tests (`test_runtime_shader_links`, `test_pipeline_prep`, `SeedShaderCache`). The last one isn't skipped: `prep_jobs` already falls back to `os.cpu_count()` where `sched_getaffinity` is missing, so the test now patches with `create=True` and runs on Windows too. Nothing changes on Linux or in CI. I reported these in #313. ## Tested - [x] The checks relevant to this change passed: tests only, no GPU checks apply. - [x] Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below: no behaviour change; this is the unit suite itself. - [x] Where the table calls for AMD and NVIDIA, they passed on both: not applicable. GPU, driver and backend: none needed. Windows 11 Home 10.0.26200, Python 3.12.10, console code page cp1252 (`PYTHONUTF8` unset). Commands run and their results: ```text python -m unittest discover -s tests -q main (62c7e39): Ran 483 tests FAILED (failures=1, errors=17, skipped=140) this branch: Ran 483 tests OK (skipped=162) ``` _AI use: Claude Code (an AI coding agent) found the causes, wrote the change, and ran the suite above._ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!331
No description provided.