Skip to content

pytest pdb commands missing documentation #12946

@adamchainz

Description

@adamchainz

Run pdb's h (help) command during a pytest run with --pdb and it reports c (cont, continue) and debug as undocumented:

(Pdb) h

Documented commands (type help <topic>):
========================================
EOF    cl         down      j         next     return  tbreak     w
a      clear      enable    jump      p        retval  u          whatis
alias  commands   exit      l         pp       run     unalias    where
args   condition  h         list      q        rv      undisplay
b      d          help      ll        quit     s       unt
break  disable    ignore    longlist  r        source  until
bt     display    interact  n         restart  step    up

Miscellaneous help topics:
==========================
exec  pdb

Undocumented commands:
======================
c  cont  continue  debug

Under regular pdb, they are documented:

(Pdb) h

Documented commands (type help <topic>):
========================================
EOF    c          d        h         list      q        rv       undisplay
a      cl         debug    help      ll        quit     s        unt
alias  clear      disable  ignore    longlist  r        source   until
args   commands   display  interact  n         restart  step     up
b      condition  down     j         next      return   tbreak   w
break  cont       enable   jump      p         retval   u        whatis
bt     continue   exit     l         pp        run      unalias  where

Miscellaneous help topics:
==========================
exec  pdb

The docstrings are missing from pytest's wrapped methods here:

def do_debug(self, arg):
cls._recursive_debug += 1
ret = super().do_debug(arg)
cls._recursive_debug -= 1
return ret
def do_continue(self, arg):
ret = super().do_continue(arg)

They aren't missing for the other wrapped commands like q (quit).

This is for pytest 8.3.3 but seems to be on main too from the above link.

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: debuggingrelated to the debugging builtin plugintype: docsdocumentation improvement, missing or needing clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions