test_version_matches_pyproject() — langchain Function Reference
Architecture documentation for the test_version_matches_pyproject() function in test_version.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 84d82080_919d_1bf4_d4ec_ebaf8a207a23["test_version_matches_pyproject()"] 94361b7a_a428_148c_600d_a3472eaaaf2a["test_version.py"] 84d82080_919d_1bf4_d4ec_ebaf8a207a23 -->|defined in| 94361b7a_a428_148c_600d_a3472eaaaf2a style 84d82080_919d_1bf4_d4ec_ebaf8a207a23 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/test_version.py lines 10–27
def test_version_matches_pyproject() -> None:
"""Verify that __version__ in __init__.py matches version in pyproject.toml."""
# Get the version from the package __init__.py
init_version = langchain.__version__
# Read the version from pyproject.toml
pyproject_path = Path(__file__).parent.parent.parent / "pyproject.toml"
with pyproject_path.open() as f:
pyproject_data = toml.load(f)
pyproject_version = pyproject_data["project"]["version"]
# Assert they match
assert init_version == pyproject_version, (
f"Version mismatch: __init__.py has '{init_version}' but "
f"pyproject.toml has '{pyproject_version}'. "
f"Please update langchain/__init__.py to match pyproject.toml."
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_version_matches_pyproject() do?
test_version_matches_pyproject() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/test_version.py.
Where is test_version_matches_pyproject() defined?
test_version_matches_pyproject() is defined in libs/langchain_v1/tests/unit_tests/test_version.py at line 10.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free