[PR #3239] [Other] tests: test_setup_golden pins the core count the golden output depends on #4518

Open
opened 2026-11-07 15:36:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3239
Author: @Buddychek
Created: 10/19/2026
Status: 🔄 Open

Base: main ← Head: fix/setup-golden-cpu-count


📝 Commits (1)

  • 464500f tests: test_setup_golden pins the core count - setup derives the CPU vision encoder's threads from os.cpu_count, so the golden output moved with the machine it ran on. Mock it to the baseline PC's 12 cores. tools/test_setup_golden.py 4/4 OK

📊 Changes

1 file changed (+3 additions, -0 deletions)

View changed files

📝 tools/test_setup_golden.py (+3 -0)

📄 Description

Problem and result

setup.py derives the CPU vision encoder's threads from os.cpu_count() // 2, so tools/test_setup_golden.py's golden output moved with the machine it ran on: the golden baseline PC has 12 cores (6 threads), and on any other core count the golden comparison failed.

After: the test mocks os.cpu_count to the baseline PC's 12 cores, so the golden output is stable on every machine. Test-only change, no setup.py change.

Closed in the 0.2.0-beta tracker reset; rebased on main and re-verified per the reset note.

Approach

Mock os.cpu_count to 12 in the golden test's fixture, matching the baseline the golden file was recorded on.

Validation

Passed, rebased on 0.2.0-beta main (e88ee39d): python tools/test_setup_golden.py → 4/4 OK, exit 0. Windows 11, Python 3.15, no GPU needed.
Not run: CI.

Limits

Test-only; the mock pins the value the golden file was recorded with, it does not change how setup derives threads on a real machine.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3239 **Author:** [@Buddychek](https://github.com/Buddychek) **Created:** 10/19/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/setup-golden-cpu-count` --- ### 📝 Commits (1) - [`464500f`](https://github.com/Niko1221/Strata/commit/464500f625504b6d4604960413f28e6b25bde83f) tests: test_setup_golden pins the core count - setup derives the CPU vision encoder's threads from os.cpu_count, so the golden output moved with the machine it ran on. Mock it to the baseline PC's 12 cores. tools/test_setup_golden.py 4/4 OK ### 📊 Changes **1 file changed** (+3 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tools/test_setup_golden.py` (+3 -0) </details> ### 📄 Description ### Problem and result `setup.py` derives the CPU vision encoder's threads from `os.cpu_count() // 2`, so `tools/test_setup_golden.py`'s golden output moved with the machine it ran on: the golden baseline PC has 12 cores (6 threads), and on any other core count the golden comparison failed. After: the test mocks `os.cpu_count` to the baseline PC's 12 cores, so the golden output is stable on every machine. Test-only change, no setup.py change. ### Related discussion Closed in the 0.2.0-beta tracker reset; rebased on main and re-verified per the reset note. ### Approach Mock `os.cpu_count` to 12 in the golden test's fixture, matching the baseline the golden file was recorded on. ### Validation Passed, rebased on 0.2.0-beta main (`e88ee39d`): `python tools/test_setup_golden.py` → 4/4 OK, exit 0. Windows 11, Python 3.15, no GPU needed. Not run: CI. ### Limits Test-only; the mock pins the value the golden file was recorded with, it does not change how setup derives threads on a real machine. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
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.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4518
No description provided.