core: fix path test (#28584)

This commit is contained in:
Erick Friis 2024-12-06 12:05:18 -08:00 committed by GitHub
parent 2c6bc74cb1
commit c38b845d7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,7 +10,11 @@ ROOT = HERE.parent.parent.parent
def test_as_import_path() -> None: def test_as_import_path() -> None:
"""Test that the path is converted to a LangChain import path.""" """Test that the path is converted to a LangChain import path."""
# Verify that default paths are correct # 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 # Verify that as import path works correctly
assert path.as_import_path(HERE, relative_to=ROOT) == "tests.unit_tests._api" assert path.as_import_path(HERE, relative_to=ROOT) == "tests.unit_tests._api"
assert ( assert (