mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 16:56:27 +02:00
--managed-python, fix flakey tests
This commit is contained in:
parent
8bc206fa0b
commit
681f9028af
2 changed files with 4 additions and 2 deletions
4
Makefile
4
Makefile
|
|
@ -181,10 +181,10 @@ publish-release:
|
|||
|
||||
# -k test_vec0_update
|
||||
test-loadable: loadable
|
||||
uv run --project tests pytest -vv -s -x . tests/test-*.py
|
||||
uv run --managed-python --project tests pytest -vv -s -x . tests/test-*.py
|
||||
|
||||
test-loadable-snapshot-update: loadable
|
||||
uv run --project tests pytest -vv tests/test-loadable.py --snapshot-update
|
||||
uv run --managed-python --project tests pytest -vv tests/test-loadable.py --snapshot-update
|
||||
|
||||
test-loadable-watch:
|
||||
watchexec --exts c,py,Makefile --clear -- make test-loadable
|
||||
|
|
|
|||
|
|
@ -2328,6 +2328,7 @@ def test_vec0_stress_small_chunks():
|
|||
data = np.zeros((1000, 8), dtype=np.float32)
|
||||
for i in range(1000):
|
||||
data[i] = np.array([(i + 1) * 0.1] * 8)
|
||||
db.execute("drop table if exists vec_small")
|
||||
db.execute("create virtual table vec_small using vec0(chunk_size=8, a float[8])")
|
||||
assert execute_all(db, "select rowid, * from vec_small") == []
|
||||
with db:
|
||||
|
|
@ -2512,6 +2513,7 @@ def topk(
|
|||
def test_stress1():
|
||||
np.random.seed(1234)
|
||||
data = np.random.uniform(-1.0, 1.0, (8000, 128)).astype(np.float32)
|
||||
db.execute("drop table if exists vec_stress1")
|
||||
db.execute(
|
||||
"create virtual table vec_stress1 using vec0( a float[128] distance_metric=cosine)"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue