Skip to content

Commit 625b993

Browse files
committed
Guard pyarrow import behind importorskip in lancedb tests
The lancedb adapter and CLI audit tests did `import pyarrow as pa` at module top, before `pytest.importorskip("lancedb")`. On CI (where the detectors+dev extras intentionally omit backend deps) pyarrow is absent too, so collection errored before the importorskip could fire. Move the pyarrow import below the lancedb importorskip and use importorskip for it as well so the tests skip cleanly, matching the chroma/pinecone tests' pattern.
1 parent 220b701 commit 625b993

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/test_adapter_lancedb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
from __future__ import annotations
1111

1212
import numpy as np
13-
import pyarrow as pa
1413
import pytest
1514

1615
lancedb = pytest.importorskip("lancedb")
16+
pa = pytest.importorskip("pyarrow")
1717

1818
from vectorpin import Signer, Verifier
1919
from vectorpin.adapters import PIN_METADATA_KEY, LanceDBAdapter

tests/test_adapter_lancedb_symbiont.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
import time
3636

3737
import numpy as np
38-
import pyarrow as pa
3938
import pytest
4039

4140
lancedb = pytest.importorskip("lancedb")
41+
pa = pytest.importorskip("pyarrow")
4242

4343
from vectorpin import Signer, Verifier
4444
from vectorpin.adapters import PIN_METADATA_KEY, LanceDBAdapter

tests/test_cli_audit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
from pathlib import Path
1717

1818
import numpy as np
19-
import pyarrow as pa
2019
import pytest
2120

2221
lancedb = pytest.importorskip("lancedb")
2322
chromadb = pytest.importorskip("chromadb")
23+
pa = pytest.importorskip("pyarrow")
2424

2525
from vectorpin import Signer
2626
from vectorpin.adapters import (

0 commit comments

Comments
 (0)