pytest-pudb

raw JSON →
0.7.0 verified Fri May 01 auth: no python

A pytest plugin that integrates the PuDB debugger, allowing you to drop into a full-screen debugger on test failures or at breakpoints. Current version 0.7.0. Infrequently maintained.

pip install pytest-pudb
error ERROR: usage: pytest [options] [file_or_dir] ... pytest: error: unrecognized arguments: --pudb
cause The plugin is not installed or not activated.
fix
Ensure pytest-pudb is installed and run pytest with the -p pudb option.
error ModuleNotFoundError: No module named 'pudb'
cause PuDB is not installed.
fix
Run pip install pudb in addition to pytest-pudb.
gotcha The `--pudb` flag must be used explicitly; just installing the plugin does not automatically activate the debugger.
fix Run `pytest --pudb` or set the environment variable `PYTEST_PLUGINS=pudb`.
deprecated Python 2 support is deprecated. The plugin may not be compatible with Python 3.11+ if no active maintenance.
fix Use Python 3.8-3.10 or consider alternative debugger plugins like pytest-pdb.

Enable PuDB debugger during pytest. Use -p pudb or environment variable.

import os
os.environ['PYTEST_PLUGINS'] = 'pudb'  # Or use -p pudb
# Then run: pytest --pudb