test_shader_build_fallbacks: pin LEONIDA_EXPLICIT_LOD_BIAS=0 in the ftz32 test

main's new test mocks exactly two subprocess.run calls (the ftz32 probe and the
translator); unset, build.py's --lod-bias probe ran first and used one of them,
so the translator call raised StopIteration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Tauwni
2026-11-30 12:00:36 +01:00
parent ab09fd1f86
commit f462c263e9

View File

@ -162,7 +162,7 @@ class BuildUnderFallbackTest(unittest.TestCase):
assembled = SimpleNamespace(stdout="\ts_endpgm\n", stderr="", returncode=0)
probe = SimpleNamespace(stdout=json.dumps(report), returncode=0)
translator = SimpleNamespace(returncode=23) # stop after recording the translator command
with mock.patch.dict(os.environ, {"LEONIDA_BARY_FALLBACK": "0"}), \
with mock.patch.dict(os.environ, {"LEONIDA_BARY_FALLBACK": "0", "LEONIDA_EXPLICIT_LOD_BIAS": "0"}), \
mock.patch.object(sys, "argv", ["build.py", tmp, "cs_store"]), \
mock.patch.object(self.build.mc_command, "run", return_value=assembled), \
mock.patch.object(self.build.subprocess, "run", side_effect=[probe, translator]) as calls: