test_proto_file_splitter() — langchain Function Reference
Architecture documentation for the test_proto_file_splitter() function in test_text_splitters.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 741f86b9_8e1d_73db_7481_e3efcc13c295["test_proto_file_splitter()"] 6d6b8ad4_1cfe_fbb0_e58e_76a50487c135["test_text_splitters.py"] 741f86b9_8e1d_73db_7481_e3efcc13c295 -->|defined in| 6d6b8ad4_1cfe_fbb0_e58e_76a50487c135 style 741f86b9_8e1d_73db_7481_e3efcc13c295 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/text-splitters/tests/unit_tests/test_text_splitters.py lines 738–769
def test_proto_file_splitter() -> None:
splitter = RecursiveCharacterTextSplitter.from_language(
Language.PROTO, chunk_size=CHUNK_SIZE, chunk_overlap=0
)
code = """
syntax = "proto3";
package example;
message Person {
string name = 1;
int32 age = 2;
repeated string hobbies = 3;
}
"""
chunks = splitter.split_text(code)
assert chunks == [
"syntax =",
'"proto3";',
"package",
"example;",
"message Person",
"{",
"string name",
"= 1;",
"int32 age =",
"2;",
"repeated",
"string hobbies",
"= 3;",
"}",
]
Domain
Subdomains
Source
Frequently Asked Questions
What does test_proto_file_splitter() do?
test_proto_file_splitter() is a function in the langchain codebase, defined in libs/text-splitters/tests/unit_tests/test_text_splitters.py.
Where is test_proto_file_splitter() defined?
test_proto_file_splitter() is defined in libs/text-splitters/tests/unit_tests/test_text_splitters.py at line 738.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free