MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_content_length

Method test_content_length

tests/display/test_models.py:271–279  ·  view source on GitHub ↗

Test content length property.

(self)

Source from the content-addressed store, hash-verified

269 assert abs(elapsed1 - elapsed2) < 0.01
270
271 def test_content_length(self):
272 """Test content length property."""
273 state = StreamingState()
274
275 state.add_chunk(StreamingChunk(content="Hello"))
276 assert state.content_length == 5
277
278 state.add_chunk(StreamingChunk(content=" world"))
279 assert state.content_length == 11
280
281
282class TestDisplayUpdate:

Callers

nothing calls this directly

Calls 3

add_chunkMethod · 0.95
StreamingStateClass · 0.90
StreamingChunkClass · 0.90

Tested by

no test coverage detected