test_split_json_many_calls() — langchain Function Reference
Architecture documentation for the test_split_json_many_calls() function in test_text_splitters.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD e755e835_6a2e_a900_b2fb_5ffef40162a2["test_split_json_many_calls()"] 6d6b8ad4_1cfe_fbb0_e58e_76a50487c135["test_text_splitters.py"] e755e835_6a2e_a900_b2fb_5ffef40162a2 -->|defined in| 6d6b8ad4_1cfe_fbb0_e58e_76a50487c135 style e755e835_6a2e_a900_b2fb_5ffef40162a2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/text-splitters/tests/unit_tests/test_text_splitters.py lines 3207–3225
def test_split_json_many_calls() -> None:
x = {"a": 1, "b": 2}
y = {"c": 3, "d": 4}
splitter = RecursiveJsonSplitter()
chunk0 = splitter.split_json(x)
assert chunk0 == [{"a": 1, "b": 2}]
chunk1 = splitter.split_json(y)
assert chunk1 == [{"c": 3, "d": 4}]
# chunk0 is now altered by creating chunk1
assert chunk0 == [{"a": 1, "b": 2}]
chunk0_output = [{"a": 1, "b": 2}]
chunk1_output = [{"c": 3, "d": 4}]
assert chunk0 == chunk0_output
assert chunk1 == chunk1_output
Domain
Subdomains
Source
Frequently Asked Questions
What does test_split_json_many_calls() do?
test_split_json_many_calls() is a function in the langchain codebase, defined in libs/text-splitters/tests/unit_tests/test_text_splitters.py.
Where is test_split_json_many_calls() defined?
test_split_json_many_calls() is defined in libs/text-splitters/tests/unit_tests/test_text_splitters.py at line 3207.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free