Skip to content

Commit 6526319

Browse files
committed
Improved tests [skip ci]
1 parent b2dafb6 commit 6526319

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/test_sqlalchemy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ def test_filter_orm(self):
158158
def test_select(self):
159159
with Session(engine) as session:
160160
session.add(Item(embedding=[2, 3, 3]))
161-
item = session.query(Item.embedding.l2_distance([1, 1, 1])).first()
162-
assert item[0] == 3
161+
items = session.query(Item.embedding.l2_distance([1, 1, 1])).first()
162+
assert items[0] == 3
163163

164164
def test_select_orm(self):
165165
with Session(engine) as session:
166166
session.add(Item(embedding=[2, 3, 3]))
167-
item = session.scalars(select(Item.embedding.l2_distance([1, 1, 1]))).all()
168-
assert item[0] == 3
167+
items = session.scalars(select(Item.embedding.l2_distance([1, 1, 1]))).all()
168+
assert items[0] == 3
169169

170170
def test_avg(self):
171171
with Session(engine) as session:

tests/test_sqlmodel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ def test_filter(self):
100100
def test_select(self):
101101
with Session(engine) as session:
102102
session.add(Item(embedding=[2, 3, 3]))
103-
item = session.exec(select(Item.embedding.l2_distance([1, 1, 1]))).all()
104-
assert item[0] == 3
103+
items = session.exec(select(Item.embedding.l2_distance([1, 1, 1]))).all()
104+
assert items[0] == 3
105105

106106
def test_avg(self):
107107
with Session(engine) as session:

0 commit comments

Comments
 (0)