Skip to content

Commit 7b0f2db

Browse files
committed
fix(tests): skip postgres tests when psycopg is not installed
Added pytest.importorskip('psycopg') to tests/unit/test_postgres_backend.py to properly skip tests when the optional pgvector dependency group is not installed. This fixes a test collection error that was preventing pytest from running.
1 parent 824e4d9 commit 7b0f2db

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/unit/test_postgres_backend.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
import pytest
88
from unittest.mock import Mock, MagicMock, patch
99

10+
# Skip all tests in this module if psycopg is not installed
11+
pytest.importorskip("psycopg")
12+
1013
from evolve.backend.postgres import PostgresEntityBackend
1114
from evolve.schema.core import Entity, Namespace, RecordedEntity
1215
from evolve.schema.conflict_resolution import EntityUpdate

0 commit comments

Comments
 (0)