From 681f9028af7912b8150de5f621b7fcad3bde4584 Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Fri, 13 Feb 2026 07:08:48 -0800 Subject: [PATCH] --managed-python, fix flakey tests --- Makefile | 4 ++-- tests/test-loadable.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 458a599..ee18c9c 100644 --- a/Makefile +++ b/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 diff --git a/tests/test-loadable.py b/tests/test-loadable.py index 822b94c..bc4eed1 100644 --- a/tests/test-loadable.py +++ b/tests/test-loadable.py @@ -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)" )