MCPcopy Create free account
hub / github.com/1jehuang/jcode / test_swarm_help

Function test_swarm_help

scripts/test_swarm_debug.py:328–358  ·  view source on GitHub ↗

Test that help includes new commands.

()

Source from the content-addressed store, hash-verified

326 return 0, 1
327
328def test_swarm_help():
329 """Test that help includes new commands."""
330 print("\n=== Testing Help Documentation ===")
331
332 ok, output = send_cmd("swarm:help")
333 if not ok:
334 print(f" ✗ swarm:help failed: {output[:100]}")
335 return 0, 1
336
337 passed = 0
338 failed = 0
339
340 # Check for documented commands
341 commands_to_check = [
342 "swarm:proposals",
343 "swarm:touches:swarm:",
344 "timestamp",
345 "swarm:session",
346 "events:recent",
347 "events:since",
348 ]
349
350 for cmd in commands_to_check:
351 if cmd.lower() in output.lower():
352 print(f" ✓ Help documents {cmd}")
353 passed += 1
354 else:
355 print(f" ✗ Help missing {cmd}")
356 failed += 1
357
358 return passed, failed
359
360
361def test_event_commands():

Callers

nothing calls this directly

Calls 1

send_cmdFunction · 0.70

Tested by

no test coverage detected