Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document Keyboard Interrupt will only show a stack trace with --fulltrace #513

Closed
pytestbot opened this issue May 11, 2014 · 7 comments
Closed
Labels
good first issue easy issue that is friendly to new contributor status: help wanted developers would like help from experts on this topic type: docs documentation improvement, missing or needing clarification type: enhancement new feature or API change, should be merged into features branch

Comments

@pytestbot
Copy link
Contributor

Originally reported by: Matthias Urlichs (BitBucket: smurfix, GitHub: smurfix)


Sometimes (a test runs very long for no good reason, goes into endless recursion or a loop) I want an interrupt with stack trace / pdb when I press ^C.

Could you please add an option which turns off catching KeyboardInterrupt and handles it like any other error?


@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


Today, if you pass --fulltrace you'd see at least a stack trace. Would it make sense to drop to PDB on keyboard interrupt when "--pdb" is specified? (I'd like to avoid adding another command line option if it can be avoided).

@pytestbot
Copy link
Contributor Author

Original comment by Matthias Urlichs (BitBucket: smurfix, GitHub: smurfix):


Hi,

Yes, that would be great; my system has a pretty deep object hierarchy and
I'd want to check if the recursion I see is genuine.

I didn't check --full-trace, assuming that it only affects how much of the
stack trace is displayed, but not whether they're shown at all; you might
want to amend the documentation.

-- Matthias Urlichs

@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


OK. Please note, though, that I am spending my time on reviewing pull requests and implementing features or fixing bugs that are high priority to me. That's requiring quite a lot of my time already. IOW, while i welcome suggestions i also depend on pull requests and people wanting to improve things for their own use cases themselves.

@pytestbot pytestbot added the type: enhancement new feature or API change, should be merged into features branch label Jun 15, 2015
@RonnyPfannschmidt RonnyPfannschmidt added status: help wanted developers would like help from experts on this topic type: docs documentation improvement, missing or needing clarification labels Jul 25, 2015
@RonnyPfannschmidt RonnyPfannschmidt changed the title Keyboard Interrupt doesn't show a stack trace document Keyboard Interrupt will only show a stack trace with --fulltrace Jul 25, 2015
@RonnyPfannschmidt
Copy link
Member

as noted by the original reporter it was a bit hard to figure

@RonnyPfannschmidt RonnyPfannschmidt added the good first issue easy issue that is friendly to new contributor label Jul 25, 2015
@omarkohl
Copy link
Contributor

This issue is identical or closely related to #1366.

Should the --fulltrace option be further documented?

@nicoddemus
Copy link
Member

Should the --fulltrace option be further documented?

That would be great. Could you open a PR @omarkohl ? 😁

@The-Compiler
Copy link
Member

Closing this as there's a message when hitting ctrl-c now.

lgpage pushed a commit to lgpage/pytest that referenced this issue Apr 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue easy issue that is friendly to new contributor status: help wanted developers would like help from experts on this topic type: docs documentation improvement, missing or needing clarification type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

5 participants