Skip to content

Add tests for error_handlers modul#885

Open
mayank0030 wants to merge 2 commits into
pyupio:mainfrom
mayank0030:increase-test-coverage
Open

Add tests for error_handlers modul#885
mayank0030 wants to merge 2 commits into
pyupio:mainfrom
mayank0030:increase-test-coverage

Conversation

@mayank0030

Copy link
Copy Markdown

Adds unit tests for the safety.error_handlers module covering:

  • output_exception() — verifies message is printed in red to stderr, exits with correct code, and respects exit_code_output=False
  • handle_cmd_exception() decorator — verifies SafetyError is caught and passed to output_exception, generic Exception is wrapped in SafetyException, click.ClickException is re-raised, and successful functions return normally

Tests: 7/7 passing

Ref #573

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 077eab0c-811f-4617-af8a-be36ab93b394

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant