Skip to content

Allow debugger interactions in tests#3235

Open
kdeldycke wants to merge 1 commit intopallets:stablefrom
kdeldycke:fix-clirunner-debugger
Open

Allow debugger interactions in tests#3235
kdeldycke wants to merge 1 commit intopallets:stablefrom
kdeldycke:fix-clirunner-debugger

Conversation

@kdeldycke
Copy link
Copy Markdown
Collaborator

@kdeldycke kdeldycke commented Feb 28, 2026

This PR patches CliRunner to allow pdb interactions in tests.

CliRunner captures stdout, which breaks pdb.set_trace() and interactive debuggers. You can't debug inside an invoked command because stdout is redirected.

By playing nice with pdb in Click tests, we can improve the experience of developers and maintainers, and as a far reaching goal, maybe improve bug reporting from the community.

This PR:

@kdeldycke kdeldycke changed the title Patch pdb in CliRunner to allow debugger interactions in tests Allow debugger interactions in tests Feb 28, 2026
@kdeldycke kdeldycke added bug f:test runner feature: cli test runner labels Feb 28, 2026
@kdeldycke kdeldycke added this to the 8.3.2 milestone Feb 28, 2026
@kdeldycke kdeldycke force-pushed the fix-clirunner-debugger branch 2 times, most recently from 2e1a7d7 to c040895 Compare February 28, 2026 13:00
@Rowlando13 Rowlando13 modified the milestones: 8.3.2, 8.3.3 Mar 15, 2026
@kdeldycke kdeldycke force-pushed the fix-clirunner-debugger branch from b1924ba to 3271451 Compare April 8, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug f:test runner feature: cli test runner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants