Repository navigation
Allow passing a custom Pdb subclass via --pdbcls. - #1712
Conversation
This obviates the need for plugins such as `pytest-ipdb`; instead one can simply call `py.test --pdb=IPython.core.debugger:Pdb`
|
Hi @anntzer thanks for the PR! To implement this test, I suggest implementing a dummy debugger class inside the test function and ensuring that it gets instantiated. |
| giving no clue about the actual reason for double-added options. | ||
|
|
||
| * | ||
| * Allow passing a custom debugger class (e.g. ``IPython.core.debugger:Pdb`` |
There was a problem hiding this comment.
This should go into "New Features" and please include a "Thanks @anntzer for the PR" message 😉
|
The tests are failing due to "reading from stdin while output is captured" even though this does not seem to occur when manually trying the new feature... any chance you can help me there? |
| help="start the interactive Python debugger on errors.") | ||
| group._addoption( | ||
| '--pdbcls', dest="usepdb_cls", metavar="modulename:classname", | ||
| help="start a custom interactive Python debugger on errors.") |
There was a problem hiding this comment.
I think you can add your example here:
help="start a custom interactive Python debugger on errors."
"For example: --pdbcls=IPython.core.debugger:Pdb" |
Aside from my comments this looks good to me! 😁 |
Sure, I will try your branch in a bit. |
|
@anntzer please check this commit on my fork. That fixes your test. The problem is that by using a Feel free to cherry-pick that commit into your branch. |
|
done. |
|
|
||
| * | ||
| * Allow passing a custom debugger class (e.g. ``IPython.core.debugger:Pdb`` | ||
| via ``--pdbcls``. Thanks to `@anntzer`_ for the PR. |
There was a problem hiding this comment.
We need to add a reference to anntzer down below, otherwise linting will fail.
Also, we should have a closing parenthesis after --pdbcls here.
|
Thanks! There's a minor adjustment needed to the CHANGELOG, other than that I think this looks good. |
(and edit CHANGELOG)
|
good to merge? |
|
IMHO yes, please do it if you don't have other comments on it. 😁 |
This obviates the need for plugins such as
pytest-ipdb; instead one can simply callpy.test --pdbcls=IPython.core.debugger:PdbA test is missing, advice as to how to best implement one would be appreciated.