Skip to content

Commit

Permalink
Unset Cache in Tests (langchain-ai#7362)
Browse files Browse the repository at this point in the history
This is impacting other unit tests that use callbacks since the cache is
still set (just empty)
  • Loading branch information
hinthornw authored Jul 7, 2023
1 parent 3ce4e46 commit 4e180dc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/unit_tests/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down

0 comments on commit 4e180dc

Please sign in to comment.