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

test_multi_byte_character_multiple_chunks() — anthropic-sdk-python Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

tests/decoders/test_jsonl.py lines 46–60

async def test_multi_byte_character_multiple_chunks(
    sync: bool,
) -> None:
    def body() -> Iterator[bytes]:
        yield b'{"content":"'
        # bytes taken from the string 'известни' and arbitrarily split
        # so that some multi-byte characters span multiple chunks
        yield b"\xd0"
        yield b"\xb8\xd0\xb7\xd0"
        yield b"\xb2\xd0\xb5\xd1\x81\xd1\x82\xd0\xbd\xd0\xb8"
        yield b'"}\n'

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

    assert await iter_next(iterator) == {"content": "известни"}

Subdomains

Frequently Asked Questions

What does test_multi_byte_character_multiple_chunks() do?
test_multi_byte_character_multiple_chunks() is a function in the anthropic-sdk-python codebase, defined in tests/decoders/test_jsonl.py.
Where is test_multi_byte_character_multiple_chunks() defined?
test_multi_byte_character_multiple_chunks() is defined in tests/decoders/test_jsonl.py at line 46.
What does test_multi_byte_character_multiple_chunks() call?
test_multi_byte_character_multiple_chunks() 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