-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Copy docstrings to wrapped pdb methods #12947
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixed missing help for :mod:`pdb` commands wrapped by pytest. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,6 +159,8 @@ | |
cls._recursive_debug -= 1 | ||
return ret | ||
|
||
do_debug.__doc__ = pdb_cls.do_debug.__doc__ | ||
|
||
def do_continue(self, arg): | ||
ret = super().do_continue(arg) | ||
if cls._recursive_debug == 0: | ||
|
@@ -185,22 +187,25 @@ | |
self._continued = True | ||
return ret | ||
|
||
do_continue.__doc__ = pdb_cls.do_continue.__doc__ | ||
|
||
do_c = do_cont = do_continue | ||
|
||
def do_quit(self, arg): | ||
"""Raise Exit outcome when quit command is used in pdb. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not keep this as is? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems reasonable to copy the original docstring from |
||
|
||
This is a bit of a hack - it would be better if BdbQuit | ||
could be handled, but this would require to wrap the | ||
whole pytest run, and adjust the report etc. | ||
""" | ||
# Raise Exit outcome when quit command is used in pdb. | ||
# | ||
# This is a bit of a hack - it would be better if BdbQuit | ||
# could be handled, but this would require to wrap the | ||
# whole pytest run, and adjust the report etc. | ||
ret = super().do_quit(arg) | ||
|
||
if cls._recursive_debug == 0: | ||
outcomes.exit("Quitting debugger") | ||
|
||
return ret | ||
|
||
do_quit.__doc__ = pdb_cls.do_quit.__doc__ | ||
|
||
do_q = do_quit | ||
do_exit = do_quit | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(optional)