Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

[Other] engine hash tests: mock the release probe, keep the engine folder in a temp dir

Niko1221a269d1b983b1
diff --git a/tools/test_setup_engine_hash.py b/tools/test_setup_engine_hash.py
index 86c8b2850..2c09a8f2d 100644
--- a/tools/test_setup_engine_hash.py
+++ b/tools/test_setup_engine_hash.py
@@ -295,6 +295,12 @@ class WhatARefusalDoesToTheCaller(unittest.TestCase):
self.tmp = tempfile.TemporaryDirectory()
self.addCleanup(self.tmp.cleanup)
(Path(self.tmp.name) / "engine").mkdir(parents=True, exist_ok=True)
+ # get_prebuilt looks for the release with a HEAD request before it downloads (0.2.0), and keeps the engine in
+ # an engine folder of its own: no network, and never this checkout's engine folder. A published release answers the probe.
+ for patcher in (mock.patch.object(setup, "engine_dir", lambda toolkit=13: Path(self.tmp.name) / "engine"),
+ mock.patch.object(setup, "_urlopen", lambda req, timeout=None: mock.MagicMock())):
+ patcher.start()
+ self.addCleanup(patcher.stop)
def fake_download(self, url, dst, what=None):
with zipfile.ZipFile(dst, "w") as z: