From 56a9893d14964bc3af00e1afa93951ee20ed4fcd Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 8 Mar 2025 16:19:04 -0800 Subject: [PATCH] test_cost_azure_openai_prompt_caching --- tests/local_testing/test_completion_cost.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/local_testing/test_completion_cost.py b/tests/local_testing/test_completion_cost.py index 5de92163164..33fc6cfd3af 100644 --- a/tests/local_testing/test_completion_cost.py +++ b/tests/local_testing/test_completion_cost.py @@ -1423,7 +1423,9 @@ def test_cost_azure_openai_prompt_caching(): print("_expected_cost2", _expected_cost2) print("cost_2", cost_2) - assert cost_2 == _expected_cost2 + assert ( + abs(cost_2 - _expected_cost2) < 1e-5 + ) # Allow for small floating-point differences def test_completion_cost_vertex_llama3():