test_chroma_handles_none_page_content() — langchain Function Reference
Architecture documentation for the test_chroma_handles_none_page_content() function in test_vectorstores.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 127ca0ed_44d0_fe62_9f4d_afacb96463cf["test_chroma_handles_none_page_content()"] 289e5a4f_8e2e_ddb6_af2e_804f91dabdb8["test_vectorstores.py"] 127ca0ed_44d0_fe62_9f4d_afacb96463cf -->|defined in| 289e5a4f_8e2e_ddb6_af2e_804f91dabdb8 style 127ca0ed_44d0_fe62_9f4d_afacb96463cf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/chroma/tests/integration_tests/test_vectorstores.py lines 833–850
def test_chroma_handles_none_page_content() -> None:
"""Test that Chroma gracefully handles None page_content values."""
from langchain_chroma.vectorstores import _results_to_docs_and_scores
mock_results = {
"documents": [["valid content", None, "another valid content"]],
"metadatas": [[{"key": "value1"}, {"key": "value2"}, {"key": "value3"}]],
"ids": [["id1", "id2", "id3"]],
"distances": [[0.1, 0.2, 0.3]],
}
docs_and_scores = _results_to_docs_and_scores(mock_results)
assert len(docs_and_scores) == 2
assert docs_and_scores[0][0].page_content == "valid content"
assert docs_and_scores[1][0].page_content == "another valid content"
assert docs_and_scores[0][0].id == "id1"
assert docs_and_scores[1][0].id == "id3"
Domain
Subdomains
Source
Frequently Asked Questions
What does test_chroma_handles_none_page_content() do?
test_chroma_handles_none_page_content() is a function in the langchain codebase, defined in libs/partners/chroma/tests/integration_tests/test_vectorstores.py.
Where is test_chroma_handles_none_page_content() defined?
test_chroma_handles_none_page_content() is defined in libs/partners/chroma/tests/integration_tests/test_vectorstores.py at line 833.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free