Test that help includes new commands.
()
| 326 | return 0, 1 |
| 327 | |
| 328 | def 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 | |
| 361 | def test_event_commands(): |
nothing calls this directly
no test coverage detected