Skip to content

Commit 681f902

Browse files
committed
--managed-python, fix flakey tests
1 parent 8bc206f commit 681f902

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ publish-release:
181181

182182
# -k test_vec0_update
183183
test-loadable: loadable
184-
uv run --project tests pytest -vv -s -x . tests/test-*.py
184+
uv run --managed-python --project tests pytest -vv -s -x . tests/test-*.py
185185

186186
test-loadable-snapshot-update: loadable
187-
uv run --project tests pytest -vv tests/test-loadable.py --snapshot-update
187+
uv run --managed-python --project tests pytest -vv tests/test-loadable.py --snapshot-update
188188

189189
test-loadable-watch:
190190
watchexec --exts c,py,Makefile --clear -- make test-loadable

tests/test-loadable.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2328,6 +2328,7 @@ def test_vec0_stress_small_chunks():
23282328
data = np.zeros((1000, 8), dtype=np.float32)
23292329
for i in range(1000):
23302330
data[i] = np.array([(i + 1) * 0.1] * 8)
2331+
db.execute("drop table if exists vec_small")
23312332
db.execute("create virtual table vec_small using vec0(chunk_size=8, a float[8])")
23322333
assert execute_all(db, "select rowid, * from vec_small") == []
23332334
with db:
@@ -2512,6 +2513,7 @@ def topk(
25122513
def test_stress1():
25132514
np.random.seed(1234)
25142515
data = np.random.uniform(-1.0, 1.0, (8000, 128)).astype(np.float32)
2516+
db.execute("drop table if exists vec_stress1")
25152517
db.execute(
25162518
"create virtual table vec_stress1 using vec0( a float[128] distance_metric=cosine)"
25172519
)

0 commit comments

Comments
 (0)