From c38b845d7ebd4673fb7d41abc95f3953b297713c Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Fri, 6 Dec 2024 12:05:18 -0800 Subject: [PATCH] core: fix path test (#28584) --- libs/core/tests/unit_tests/_api/test_path.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/core/tests/unit_tests/_api/test_path.py b/libs/core/tests/unit_tests/_api/test_path.py index 89428c7cfcb..93896aab115 100644 --- a/libs/core/tests/unit_tests/_api/test_path.py +++ b/libs/core/tests/unit_tests/_api/test_path.py @@ -10,7 +10,11 @@ ROOT = HERE.parent.parent.parent def test_as_import_path() -> None: """Test that the path is converted to a LangChain import path.""" # Verify that default paths are correct - assert path.PACKAGE_DIR == ROOT / "langchain_core" + + # if editable install, check directory structure + if path.PACKAGE_DIR == ROOT / "langchain_core": + assert path.PACKAGE_DIR == ROOT / "langchain_core" + # Verify that as import path works correctly assert path.as_import_path(HERE, relative_to=ROOT) == "tests.unit_tests._api" assert (