test(test_async_fn.py): add better error logging

This commit is contained in:
Krrish Dholakia 2023-10-30 18:18:02 -07:00
parent 7578716adc
commit 844ab5f1e5

View file

@ -19,7 +19,7 @@ def test_async_response():
try:
response = await acompletion(model="gpt-3.5-turbo", messages=messages)
except Exception as e:
pass
pytest.fail(f"An exception occurred: {e}")
response = asyncio.run(test_get_response())
# print(response)
@ -51,7 +51,7 @@ def test_get_response_streaming():
assert len(output) > 0, "Length of output needs to be greater than 0."
except Exception as e:
pass
pytest.fail(f"An exception occurred: {e}")
return response
asyncio.run(test_async_call())