-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: help wanteddevelopers would like help from experts on this topicdevelopers would like help from experts on this topictype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branchtype: feature-branchnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch
Description
Thanks for the work of pytest which is a great tool.
This actually a feature request. I know we could use --pdb
to stop the test running and drop into a debugger. But for some cases, it's too late, e.g.
def test_foo():
result = foo()
self.assertEqual(result, 0)
In this case, we have no chance to re-run foo
and get to know what happened. We have to manually add a breakpoint at the first line of test_foo()
, run the test again, fix the problem, and finally remove the breakpoint.
My suggestion is to add an option, say --trace
which can automatically drop into debugger for at the first line of selected tests, that will boost the cycle of trouble shooting when combine with either option --lf
or -k
.
Metadata
Metadata
Assignees
Labels
status: help wanteddevelopers would like help from experts on this topicdevelopers would like help from experts on this topictype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branchtype: feature-branchnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch