Home / Function/ test_new_lines_in_json() — anthropic-sdk-python Function Reference

test_new_lines_in_json() — anthropic-sdk-python Function Reference

Architecture documentation for the test_new_lines_in_json() function in test_jsonl.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  7d498117_8c32_2517_69d8_44577a79204b["test_new_lines_in_json()"]
  7e6f1ef1_47fa_dc28_4bd9_c457af975269["test_jsonl.py"]
  7d498117_8c32_2517_69d8_44577a79204b -->|defined in| 7e6f1ef1_47fa_dc28_4bd9_c457af975269
  6707cd01_7500_5cae_e645_5cf9bf66f082["make_jsonl_iterator()"]
  7d498117_8c32_2517_69d8_44577a79204b -->|calls| 6707cd01_7500_5cae_e645_5cf9bf66f082
  e921b3a3_39cd_cd70_1309_9d685c86876e["iter_next()"]
  7d498117_8c32_2517_69d8_44577a79204b -->|calls| e921b3a3_39cd_cd70_1309_9d685c86876e
  style 7d498117_8c32_2517_69d8_44577a79204b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/decoders/test_jsonl.py lines 34–42

async def test_new_lines_in_json(
    sync: bool,
) -> None:
    def body() -> Iterator[bytes]:
        yield b'{"content":"Hello, world!\\nHow are you doing?"}'

    iterator = make_jsonl_iterator(content=body(), sync=sync, line_type=object)

    assert await iter_next(iterator) == {"content": "Hello, world!\nHow are you doing?"}

Subdomains

Frequently Asked Questions

What does test_new_lines_in_json() do?
test_new_lines_in_json() is a function in the anthropic-sdk-python codebase, defined in tests/decoders/test_jsonl.py.
Where is test_new_lines_in_json() defined?
test_new_lines_in_json() is defined in tests/decoders/test_jsonl.py at line 34.
What does test_new_lines_in_json() call?
test_new_lines_in_json() calls 2 function(s): iter_next, make_jsonl_iterator.

Analyze Your Own Codebase

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

Try Supermodel Free