DSPy: The framework for programming—not prompting—language models
Python
test(dspy): use memory-only cache by default (#10156)
Isaac Millerc53e24904967
diff --git a/tests/conftest.py b/tests/conftest.pyindex 4c514713f..bf758c768 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -1,7 +1,6 @@import copyimport osfrom collections.abc import Iterator-from pathlib import Pathfrom typing import Anyimport pytest@@ -18,12 +17,12 @@ def _close_cache(cache: Any) -> None:@pytest.fixture(autouse=True)-def clear_settings(tmp_path: Path) -> Iterator[None]:+def clear_settings() -> Iterator[None]:"""Ensure each test gets fresh DSPy settings and an isolated cache."""import dspyoriginal_cache = dspy.cache- dspy.configure_cache(disk_cache_dir=tmp_path / ".dspy_cache")+ dspy.configure_cache(enable_disk_cache=False, enable_memory_cache=True, disk_cache_dir=None)try:yieldfinally: