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 (