Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Give the desktop release tests an explicit utf-8 encoding (#11372)

Daniel Han7cc58b451466
diff --git a/tests/security/test_desktop_release_resolver.py b/tests/security/test_desktop_release_resolver.py
index 49bf345734f..9e895f0185a 100644
--- a/tests/security/test_desktop_release_resolver.py
+++ b/tests/security/test_desktop_release_resolver.py
@@ -121,7 +121,7 @@ def test_the_resolver_keeps_looking_past_a_release_without_the_asset():
def test_linux_download_skips_only_unreleased_arm64(
tmp_path, suffix, mode, tag, returncode, unreleased
):
- workflow = yaml.safe_load(WORKFLOW.read_text())
+ workflow = yaml.safe_load(WORKFLOW.read_text(encoding = "utf-8"))
download = next(
step
for step in workflow["jobs"]["linux"]["steps"]
@@ -129,7 +129,7 @@ def test_linux_download_skips_only_unreleased_arm64(
)
script = tmp_path / ".github/scripts/resolve-desktop-release.py"
script.parent.mkdir(parents = True)
- script.write_text(SCRIPT.read_text())
+ script.write_text(SCRIPT.read_text(encoding = "utf-8"), encoding = "utf-8")
fake_bin = tmp_path / "bin"
fake_bin.mkdir()
gh = fake_bin / "gh"
diff --git a/tests/security/test_release_desktop_integrity.py b/tests/security/test_release_desktop_integrity.py
index de1222f1f9c..287dabb6d3e 100644
--- a/tests/security/test_release_desktop_integrity.py
+++ b/tests/security/test_release_desktop_integrity.py
@@ -908,7 +908,9 @@ def test_linux_deb_architectures_stage_distinct_assets_and_validate_together(tmp
def test_linux_clean_machine_downloads_only_the_runner_architecture(tmp_path):
workflow = yaml.safe_load(
- (REPO_ROOT / ".github/workflows/desktop-app-clean-machine-ci.yml").read_text()
+ (REPO_ROOT / ".github/workflows/desktop-app-clean-machine-ci.yml").read_text(
+ encoding = "utf-8"
+ )
)
job = workflow["jobs"]["linux"]
assert job["runs-on"] == "${{ matrix.os }}"