Files
python-sdk/tests/test_todo.py
T
zeekay bff668fbf6 feat: Add STRICT CI/CD quality gates - NO MORE TODO/STUB BULLSHIT
- Added comprehensive anti-stub test suite that detects:
  - TODO/FIXME/STUB/FAKE/UNFINISHED patterns
  - Empty functions with only pass/ellipsis
  - NotImplementedError raises
  - Mock implementations in production
  - Debug prints in production
  - Skipped tests

- Created strict GitHub Actions workflow that:
  - BLOCKS deployment if ANY forbidden patterns found
  - Requires ALL tests to pass (no skips allowed)
  - Runs security scans
  - Verifies all functions are implemented
  - Only allows PyPI publish after ALL checks pass

- Added pre-commit hooks to catch issues locally before push
- Updated Makefile with 'make check' that runs all quality gates
- Fixed stub function issue in tools/__init__.py

This ensures we NEVER deploy incomplete or stub code to production again!
2025-09-17 02:55:28 +00:00

55 lines
1.5 KiB
Python

#!/usr/bin/env python
"""Test the todo manager directly."""
import asyncio
from rich.console import Console
from pkg.hanzo.src.hanzo.interactive.todo_manager import TodoManager
async def test_todo():
console = Console()
manager = TodoManager(console)
# Add some todos
print("Adding todos...")
todo1 = manager.add_todo(
title="Implement new feature",
description="Add support for webhooks",
priority="high",
tags=["dev", "backend"],
due_date="2025-01-15"
)
print(f"Added: {todo1.title} (ID: {todo1.id})")
todo2 = manager.quick_add("Fix bug in auth system #bug #urgent !urgent @today")
print(f"Added: {todo2.title} (ID: {todo2.id})")
todo3 = manager.quick_add("Write documentation #docs !low")
print(f"Added: {todo3.title} (ID: {todo3.id})")
# Display todos
print("\nAll Todos:")
manager.display_todos()
# Update a todo
print(f"\nMarking {todo2.id} as in progress...")
manager.update_todo(todo2.id, status="in_progress")
# Display filtered todos
print("\nHigh priority todos:")
high_priority = manager.list_todos(priority="high")
manager.display_todos(high_priority, "High Priority")
# Show statistics
print("\nStatistics:")
manager.display_statistics()
# Show detail
print(f"\nDetail for {todo1.id}:")
manager.display_todo_detail(todo1)
if __name__ == "__main__":
asyncio.run(test_todo())