Skip to content

Commit b79ca4b

Browse files
committed
attempt to fix test coverage
1 parent ee04b6d commit b79ca4b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/server/test_session.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,14 @@ async def test_create_message_tool_result_validation():
408408
# Note: no tools parameter
409409
)
410410

411+
# Case 8: empty messages list - skips validation entirely
412+
# Covers the `if messages:` branch (line 280->302)
413+
with anyio.move_on_after(0.01):
414+
await session.create_message(
415+
messages=[],
416+
max_tokens=100,
417+
)
418+
411419

412420
@pytest.mark.anyio
413421
async def test_create_message_without_tools_capability():

0 commit comments

Comments
 (0)