Dropping Into the Debugger
Start a pdb.post_mortem() on errors and failures.
This plugin implements testOutcome() and will drop into pdb
whenever it sees a test outcome that includes exc_info.
It fires beforeInteraction() before launching pdb and
afterInteraction() after. Other plugins may implement
beforeInteraction() to return False and set event.handled to
prevent this plugin from launching pdb.
Configuration [debugger]
- always-on
- Default:
False
- Type:
boolean
- errors-only
- Default:
False
- Type:
boolean
Sample configuration
The default configuration is equivalent to including the following in a unittest.cfg file.
[debugger]
always-on = False
errors-only = False
Command-line options
- -D DEFAULT, --debugger DEFAULT
Enter pdb on test fail or error