Skip to content

Commit

Permalink
Added test for AsIs
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Sep 15, 2023
1 parent 695557e commit 01159f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_peewee.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from math import sqrt
import numpy as np
from peewee import Model, PostgresqlDatabase
from peewee import AsIs, Model, PostgresqlDatabase
from pgvector.peewee import VectorField

db = PostgresqlDatabase('pgvector_python_test')
Expand Down Expand Up @@ -72,3 +72,4 @@ def test_where(self):
def test_get_or_create(self):
Item.get_or_create(id=1, defaults={'embedding': [1, 2, 3]})
Item.get_or_create(embedding=np.array([4, 5, 6]))
Item.get_or_create(embedding=AsIs([7, 8, 9]))

0 comments on commit 01159f5

Please sign in to comment.