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.

Studio tests: skip rag_conn where this Python's sqlite3 cannot load extensions (#15862)

Daniel Han9a9d5f5547fb
diff --git a/studio/backend/tests/conftest.py b/studio/backend/tests/conftest.py
index ae4b26e0188..0308c38c46d 100644
--- a/studio/backend/tests/conftest.py
+++ b/studio/backend/tests/conftest.py
@@ -979,8 +979,15 @@ def rag_home(tmp_path, monkeypatch, linkable_temp_base):
@pytest.fixture
def rag_conn(rag_home):
"""A fresh RAG connection bound to the isolated ``rag_home`` database."""
+ import sqlite3
+
from storage import rag_db
+ # Same gate as the RAG tests that skip on their own: an interpreter whose sqlite3 cannot load
+ # extensions (the macos-15 runner's) never has RAG, and the product reports that rather than
+ # failing. Anything else that stops sqlite-vec loading still errors here.
+ if not rag_db.RAG_AVAILABLE or not hasattr(sqlite3.Connection, "enable_load_extension"):
+ pytest.skip("sqlite-vec cannot be loaded by this Python's sqlite3")
conn = rag_db.get_connection()
try:
yield conn