Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

feat(tests): cache file.

Amir Mehrcac66f8efd86
diff --git a/tests_integration/base.py b/tests_integration/base.py
index ef079d9e3..e69de29bb 100644
--- a/tests_integration/base.py
+++ b/tests_integration/base.py
@@ -1,17 +0,0 @@
-import os
-from pathlib import Path
-
-import pytest
-
-
-class BaseIntegrationTestWithCache:
- @pytest.fixture(autouse=True)
- def setup(self) -> None:
- # Base directory for all DSPy modules
- library_dir = Path(__file__).resolve().parent
- base_dir = library_dir.parent
- cache_dir = str(base_dir / "cache")
- os.environ["DSP_NOTEBOOK_CACHEDIR"] = cache_dir
-
- if cache_dir and not Path(cache_dir).exists():
- Path(cache_dir).mkdir(parents=True)
diff --git a/tests_integration/test_intro.py b/tests_integration/test_intro.py
index ec2d76026..7c9d2a185 100644
--- a/tests_integration/test_intro.py
+++ b/tests_integration/test_intro.py
@@ -1,7 +1,23 @@
+import os
+from pathlib import Path
from typing import Any
+import pytest
+
import dspy
-from tests_integration.base import BaseIntegrationTestWithCache
+
+
+class BaseIntegrationTestWithCache:
+ @pytest.fixture(autouse=True)
+ def setup(self) -> None:
+ # Base directory for all DSPy modules
+ library_dir = Path(__file__).resolve().parent
+ base_dir = library_dir.parent
+ cache_dir = str(base_dir / "cache")
+ os.environ["DSP_NOTEBOOK_CACHEDIR"] = cache_dir
+
+ if cache_dir and not Path(cache_dir).exists():
+ Path(cache_dir).mkdir(parents=True)
class TestIntroIntegration(BaseIntegrationTestWithCache):