alfredodeza / pytest.vim

Runs your UnitTests with py.test displaying red/green bars and errors
274 stars 40 forks source link

Use ipdb or ipython capabilities when available. #49

Closed decko closed 7 years ago

decko commented 7 years ago

ipdb uses ipython terminal capabilities to let developers interact with python code at a breakpoint. It would be nice to use it instead pdb if it's available.

alfredodeza commented 7 years ago

One can use ipdb or anything really, you just need to pass the -s option when running. For example in a test method that has import ipdb; ipdb.set_trace() you can do this:

:Pytest method -s

And it will drop to a shell with ipython. Do you mean something different? Does the example not work for you?

decko commented 7 years ago

Sorry @alfredodeza. I didn't read the docs. It works here with ipdb.

But when I have a split on the window, after the -s or --pdb exits it close the split where it ran. It's the expected behavior?

alfredodeza commented 7 years ago

@decko if the process exits so will the window. If you want to keep it around, don't exit. Closing this now since this is not really a bug. Feel free to re-open if you encounter a problem