From 4e180dc54ee68fa4816531c124aeb3137c8967c5 Mon Sep 17 00:00:00 2001 From: William FH <13333726+hinthornw@users.noreply.github.com> Date: Fri, 7 Jul 2023 11:05:09 -0700 Subject: [PATCH] Unset Cache in Tests (#7362) This is impacting other unit tests that use callbacks since the cache is still set (just empty) --- tests/unit_tests/test_cache.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit_tests/test_cache.py b/tests/unit_tests/test_cache.py index 279d3391f5..ffc0d801b3 100644 --- a/tests/unit_tests/test_cache.py +++ b/tests/unit_tests/test_cache.py @@ -47,6 +47,7 @@ def set_cache_and_teardown(request: FixtureRequest) -> Generator[None, None, Non # Will be run after each test if langchain.llm_cache: langchain.llm_cache.clear() + langchain.llm_cache = None else: raise ValueError("Cache not set. This should never happen.")