Skip to content
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

Setting --pdbclass should not enable --pdb #2365

Closed
sloria opened this issue Apr 13, 2017 · 5 comments
Closed

Setting --pdbclass should not enable --pdb #2365

sloria opened this issue Apr 13, 2017 · 5 comments
Labels
good first issue easy issue that is friendly to new contributor status: help wanted developers would like help from experts on this topic type: bug problem that needs to be addressed

Comments

@sloria
Copy link

sloria commented Apr 13, 2017

Currently when you pass the --pdbcls option, the --pdb behavior is automatically enabled. This is not intuitive. I want to be able to set --pdbcls=IPython.core.debugger:Pdb in my setup.cfg without always using the debugger when I run tests.

The problem appears to lie here:

    if config.getvalue("usepdb") or config.getvalue("usepdb_cls"):
        config.pluginmanager.register(PdbInvoke(), 'pdbinvoke')
         #...

Debugger behavior is enabled even if --pdb is not necessarily passed.

Would the maintainers be open to changing this?

@chrisseto
Copy link

In the mean time, you can work around this by adding the following to conftest.py

def pytest_configure(config):
    if config.option.usepdb:
        config.option.usepdb_cls = 'IPython.core.debugger:Pdb'  # Or your favorite pdb variant

@RonnyPfannschmidt RonnyPfannschmidt added type: bug problem that needs to be addressed good first issue easy issue that is friendly to new contributor status: help wanted developers would like help from experts on this topic labels Apr 13, 2017
@RonnyPfannschmidt
Copy link
Member

this one is a nice first contribution

@nicoddemus
Copy link
Member

Duplicate of #1948 and fixed in #1952.

This will be available in 3.1.0 which should be released soon.

@RonnyPfannschmidt
Copy link
Member

@nicoddemus @hpk42 i think this is a perfect example of why we need way more and way more often done feature releases

@nicoddemus
Copy link
Member

Yeah I agree 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue easy issue that is friendly to new contributor status: help wanted developers would like help from experts on this topic type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

4 participants