mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-06 11:37:12 +00:00
infra: absolute EXAMPLE_DIR
path in core unit tests (#16325)
If you invoked testing from places besides `core/`, this `EXAMPLE_DIR` path won't work. This PR makes`EXAMPLE_DIR` robust against invocation location
This commit is contained in:
parent
774e543e1f
commit
d511366dd3
@ -10,7 +10,7 @@ from langchain_core.prompts.few_shot import FewShotPromptTemplate
|
||||
from langchain_core.prompts.loading import load_prompt
|
||||
from langchain_core.prompts.prompt import PromptTemplate
|
||||
|
||||
EXAMPLE_DIR = Path("tests/unit_tests/examples").absolute()
|
||||
EXAMPLE_DIR = (Path(__file__).parent.parent / "examples").absolute()
|
||||
|
||||
|
||||
@contextmanager
|
||||
|
Loading…
Reference in New Issue
Block a user