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
pull/16516/head
James Braza 5 months ago committed by GitHub
parent 774e543e1f
commit d511366dd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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…
Cancel
Save