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.

Fix the Windows-only snapshot path assertion in the diffusion prefetch test (#7933)

Daniel Hanb325dd9ad05a
diff --git a/studio/backend/tests/test_diffusion_backend.py b/studio/backend/tests/test_diffusion_backend.py
index 8445efdbf3c..1784a5344a8 100644
--- a/studio/backend/tests/test_diffusion_backend.py
+++ b/studio/backend/tests/test_diffusion_backend.py
@@ -14,6 +14,7 @@ import contextlib
import sys
import threading
import types
+from pathlib import Path
import pytest
@@ -3448,7 +3449,8 @@ def test_prefetch_returns_snapshot_dir_for_manifest(monkeypatch):
root = backend._prefetch_files(
"base/repo", None, "base/repo", ["model_index.json", "vae/x.safetensors"], None
)
- assert root == "/cache/snap"
+ # str(Path(...).parent) uses the platform separator, so the bare literal failed on Windows.
+ assert root == str(Path("/cache/snap"))
assert (
backend._prefetch_files("base/repo", None, "base/repo", ["vae/x.safetensors"], None) is None
)