mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 12:33:59 +00:00
test(python): expand minimal dependency coverage
Expand the Linux Python test run without pandas and pylance from two files to the suite while retaining the regular dependency run for optional-package modules. Move optional imports into tests that need them and use Arrow assertions where pandas is not required, preserving the existing behavioral assertions. Validation: - Physical no-pandas/no-pylance broad run: 2884 passed, 316 skipped, 8 existing marker cases deselected. - Regular affected suite: 1687 passed, 39 skipped. - Current-head hosted integration: all 15 checks and 4 workflows passed. Co-authored-by: importcpp <57519936+importcpp@users.noreply.github.com>
This commit is contained in:
@@ -127,7 +127,7 @@ def _run_test_reranker(
|
||||
if deterministic:
|
||||
assert result1 == result2
|
||||
|
||||
query_vector = table.to_pandas()["vector"][0]
|
||||
query_vector = table.to_arrow()["vector"][0].as_py()
|
||||
result = (
|
||||
table.search(query_type="hybrid", vector_column_name="vector")
|
||||
.vector(query_vector)
|
||||
@@ -250,7 +250,7 @@ def _run_test_hybrid_reranker(reranker, tmp_path):
|
||||
assert result1 == result3 # 2 & 3 should be the same as they use score as score
|
||||
|
||||
query = "Our father who art in heaven"
|
||||
query_vector = table.to_pandas()["vector"][0]
|
||||
query_vector = table.to_arrow()["vector"][0].as_py()
|
||||
result = (
|
||||
table.search(query_type="hybrid", vector_column_name="vector")
|
||||
.vector(query_vector)
|
||||
|
||||
Reference in New Issue
Block a user