From b7ec53aec128150ea1ed404cc18eccc1ebaa99b5 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 24 Feb 2025 22:11:08 -0800 Subject: [PATCH] test: handle index error --- tests/local_testing/test_assistants.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/local_testing/test_assistants.py b/tests/local_testing/test_assistants.py index cf6d88b23a..273972e9dd 100644 --- a/tests/local_testing/test_assistants.py +++ b/tests/local_testing/test_assistants.py @@ -233,7 +233,10 @@ async def test_aarun_thread_litellm(sync_mode, provider, is_streaming): assistants = await litellm.aget_assistants(custom_llm_provider=provider) ## get the first assistant ### - assistant_id = assistants.data[0].id + try: + assistant_id = assistants.data[0].id + except IndexError: + pytest.skip("No assistants found") new_thread = test_create_thread_litellm(sync_mode=sync_mode, provider=provider)