mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3239] [Other] tests: test_setup_golden pins the core count the golden output depends on #4518
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4518
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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)
464500ftests: 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.pyderives the CPU vision encoder's threads fromos.cpu_count() // 2, sotools/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_countto 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_countto 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.