MCPcopy Index your code
hub / github.com/github/copilot-sdk / test_read_exact_single_chunk

Method test_read_exact_single_chunk

python/test_jsonrpc.py:79–90  ·  view source on GitHub ↗

Test reading data that fits in a single chunk

(self)

Source from the content-addressed store, hash-verified

77 """Tests for the _read_exact() method that handles short reads"""
78
79 def test_read_exact_single_chunk(self):
80 """Test reading data that fits in a single chunk"""
81 content = b"Hello, World!"
82 mock_stream = ShortReadStream(content, chunk_size=1024)
83
84 process = MockProcess()
85 process.stdout = mock_stream
86
87 client = JsonRpcClient(process)
88 result = client._read_exact(len(content))
89
90 assert result == content
91
92 def test_read_exact_multiple_chunks(self):
93 """Test reading data that requires multiple chunks (short reads)"""

Callers

nothing calls this directly

Calls 4

_read_exactMethod · 0.95
JsonRpcClientClass · 0.90
ShortReadStreamClass · 0.85
MockProcessClass · 0.85

Tested by

no test coverage detected