From a5df4f1a8158762bb4d2389834c06ff5eeb8cc9b Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 21 Nov 2024 22:51:19 -0800 Subject: [PATCH] test_langfuse_masked_input_output --- tests/local_testing/test_alangfuse.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/local_testing/test_alangfuse.py b/tests/local_testing/test_alangfuse.py index 4290afdaa..05b703dd2 100644 --- a/tests/local_testing/test_alangfuse.py +++ b/tests/local_testing/test_alangfuse.py @@ -263,7 +263,7 @@ audio_file = open(file_path, "rb") @pytest.mark.asyncio @pytest.mark.flaky(retries=4, delay=2) -async def test_langfuse_logging_audio_transcriptions(): +async def test_langfuse_logging_audio_transcriptions(langfuse_client): """ Test that creates a trace with masked input and output """ @@ -347,8 +347,9 @@ async def test_langfuse_masked_input_output(langfuse_client): assert trace.input == expected_input assert trace.output == expected_output - assert generations[0].input == expected_input - assert generations[0].output == expected_output + if len(generations) > 0: + assert generations[0].input == expected_input + assert generations[0].output == expected_output @pytest.mark.asyncio