Skip to content

test(unit): Add tests for unleashed-danger.py #1

@martymcenroe

Description

@martymcenroe

Problem

The unleashed-danger.py tool has zero test coverage. This tool handles dangerous operations in unleashed mode and requires careful testing to ensure safety boundaries are enforced correctly.

Goal

Add unit tests for tools/unleashed-danger.py covering:

  • Danger level classification
  • Permission checks before dangerous operations
  • Logging of dangerous actions
  • Abort mechanisms
  • Integration with unleashed mode state

Acceptance Criteria

  • Test file exists: tests/test_unleashed_danger.py
  • All public functions have test coverage
  • Tests pass: poetry run pytest tests/test_unleashed_danger.py -v
  • Mock dangerous operations (do not execute real dangerous commands)
  • Verify safety boundaries are enforced

Files to Modify

  • tests/test_unleashed_danger.py (new)
  • pyproject.toml (if new test dependencies needed)

Priority

MEDIUM - Safety boundaries are important but tool usage is limited.

Source

Identified in test gap analysis: 2026-01-17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions