Home / Function/ test_chroma_handles_none_page_content_with_vectors() — langchain Function Reference

test_chroma_handles_none_page_content_with_vectors() — langchain Function Reference

Architecture documentation for the test_chroma_handles_none_page_content_with_vectors() function in test_vectorstores.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  706ff827_be9c_fc87_a02d_b385deab7cbd["test_chroma_handles_none_page_content_with_vectors()"]
  289e5a4f_8e2e_ddb6_af2e_804f91dabdb8["test_vectorstores.py"]
  706ff827_be9c_fc87_a02d_b385deab7cbd -->|defined in| 289e5a4f_8e2e_ddb6_af2e_804f91dabdb8
  style 706ff827_be9c_fc87_a02d_b385deab7cbd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/chroma/tests/integration_tests/test_vectorstores.py lines 853–871

def test_chroma_handles_none_page_content_with_vectors() -> None:
    """Test that Chroma gracefully handles None page_content values with vectors."""
    from langchain_chroma.vectorstores import _results_to_docs_and_vectors

    mock_results = {
        "documents": [["valid content", None, "another valid content"]],
        "metadatas": [[{"key": "value1"}, {"key": "value2"}, {"key": "value3"}]],
        "ids": [["id1", "id2", "id3"]],
        "embeddings": [[[0.1, 0.2], [0.3, 0.4], [0.5, 0.6]]],
    }
    docs_and_vectors = _results_to_docs_and_vectors(mock_results)

    assert len(docs_and_vectors) == 2
    assert docs_and_vectors[0][0].page_content == "valid content"
    assert docs_and_vectors[1][0].page_content == "another valid content"
    assert docs_and_vectors[0][0].id == "id1"
    assert docs_and_vectors[1][0].id == "id3"
    assert docs_and_vectors[0][1] == [0.1, 0.2]
    assert docs_and_vectors[1][1] == [0.5, 0.6]

Domain

Subdomains

Frequently Asked Questions

What does test_chroma_handles_none_page_content_with_vectors() do?
test_chroma_handles_none_page_content_with_vectors() 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_with_vectors() defined?
test_chroma_handles_none_page_content_with_vectors() is defined in libs/partners/chroma/tests/integration_tests/test_vectorstores.py at line 853.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free