From 571e8755cb871b1dc2d1c5160046b96410264bef Mon Sep 17 00:00:00 2001 From: James Briggs <james.briggs@hotmail.com> Date: Sun, 10 Nov 2024 18:31:47 +0100 Subject: [PATCH] fix: not sync test --- tests/unit/test_sync.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/unit/test_sync.py b/tests/unit/test_sync.py index 1e4b72c1..4cf28dfc 100644 --- a/tests/unit/test_sync.py +++ b/tests/unit/test_sync.py @@ -209,15 +209,18 @@ class TestRouteLayer: os.environ.get("PINECONE_API_KEY") is None, reason="Pinecone API key required" ) def test_second_initialization_not_synced( - self, openai_encoder, routes_2, index_cls + self, openai_encoder, routes, routes_2, index_cls ): - index = init_index(index_cls) + index = init_index(index_cls, sync=None) route_layer = RouteLayer( - encoder=openai_encoder, routes=routes_2, top_k=10, index=index + encoder=openai_encoder, routes=routes, index=index + ) + route_layer2 = RouteLayer( + encoder=openai_encoder, routes=routes_2, index=index ) if index_cls is PineconeIndex: time.sleep(PINECONE_SLEEP) # allow for index to be populated - assert not route_layer.is_synced() + assert route_layer.is_synced() is False @pytest.mark.skipif( os.environ.get("PINECONE_API_KEY") is None, reason="Pinecone API key required" -- GitLab