def test_short_text_less_than_window():
    """Ensure parser handles short input without window overflow."""
    with patch.object(MockLLM, "chat", return_value="ctx"):
        parser = SlideNodeParser.from_defaults(
            llm=MockLLM(),
            chunk_size=780,
            window_size=5,
        )
        nodes = parser.get_nodes_from_documents([Document(text="One. Two.")])
        assert len(nodes) > 0
        assert all(node.metadata["local_context"] == "ctx" for node in nodes)
Ensure parser handles short input without window overflow.
llama-index-integrations/node_parser/llama-index-node-parser-slide/tests/test_node_parser_slide.py