File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -613,18 +613,17 @@ async def test_sparsevec(self, engine):
613613
614614 @pytest .mark .asyncio
615615 async def test_avg (self , engine ):
616- # TODO do not throw error when types are registered
617- if engine == psycopg_async_type_engine :
618- return
619-
620616 async_session = async_sessionmaker (engine , expire_on_commit = False )
621617
622618 async with async_session () as session :
623619 async with session .begin ():
624620 session .add (Item (embedding = [1 , 2 , 3 ]))
625621 session .add (Item (embedding = [4 , 5 , 6 ]))
626622 avg = await session .scalars (select (func .avg (Item .embedding )))
627- assert avg .first () == '[2.5,3.5,4.5]'
623+ if engine == psycopg_async_type_engine :
624+ assert avg .first ().tolist () == [2.5 , 3.5 , 4.5 ]
625+ else :
626+ assert avg .first () == '[2.5,3.5,4.5]'
628627
629628 await engine .dispose ()
630629
You can’t perform that action at this time.
0 commit comments