Skip to content

Commit b02d262

Browse files
committed
Fix: Skip non-Linux SQLite tests
For now we skip SQLite tests on MacOS, as the default module lacks `enable_load_extension`. On Windows, we have yet to find the header and the right lib to link.
1 parent 2a6d779 commit b02d262

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

python/scripts/test_sqlite.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import sqlite3
22
import json
33
import math
4-
import pytest
4+
import sys
5+
56
import numpy as np
7+
import pytest
68

79
import usearch
8-
from usearch.io import load_matrix, save_matrix
9-
from usearch.index import search
10-
from usearch.eval import random_vectors
1110

12-
from usearch.index import Match, Matches, BatchMatches, Index, Indexes
11+
if sys.platform != "linux":
12+
pytest.skip(reason="Requires Linux to run", allow_module_level=True)
1313

1414

1515
batch_sizes = [1, 3, 20]
@@ -19,7 +19,7 @@
1919
def test_sqlite_minimal_json_cosine_vector_search():
2020
"""Minimal test for searching JSON vectors in an SQLite database."""
2121
conn = sqlite3.connect(":memory:")
22-
conn.enable_load_extension(True)
22+
conn.enable_load_extension(True) # Not available on MacOS with default build
2323
conn.load_extension(usearch.sqlite)
2424

2525
cursor = conn.cursor()
@@ -54,7 +54,7 @@ def test_sqlite_minimal_json_cosine_vector_search():
5454
def test_sqlite_minimal_text_search():
5555
"""Minimal test for Unicode strings in an SQLite database."""
5656
conn = sqlite3.connect(":memory:")
57-
conn.enable_load_extension(True)
57+
conn.enable_load_extension(True) # Not available on MacOS with default build
5858
conn.load_extension(usearch.sqlite)
5959

6060
cursor = conn.cursor()

0 commit comments

Comments
 (0)