I saw this question: Can I debug with python debugger when using py.test somehow? but it doesn't really help, because I need to debug hooks, some of them not written by me, where modifying the code of the hook is really cumbersome.
Also, pytest
runs through pipenv run
. It's already difficult to make them both work together. I couldn't so far find a combination of pdb
, pipenv
and pytest
that would launch each other.
Another way I could do it is by calling pytest.main()
from my code, however, this means that other people who want to run my tests will have to use this "trampoline" to run other tests. I can live with this, but it still feels like it shouldn't be necessary.