Open aguynamedben opened 7 years ago
Thanks for the report! Always happy about good descriptions in issues :+1:
Is there any way to get sure and ipdb playing more nicely together?
On top of my head I have absolutely no idea. I'll investigate when I find some time. @gabrielfalcao Do you have experienced this?
Thanks for the time you spend working on this library. As a huge fan of RSpec/Capybara/Chai, it's godsend to have this syntax available via Python.
Good to hear! Thanks :beers:
@aguynamedben great issue report indeed 👏
This is an interesting problem.
I'll investigate the ipdb module to find a good solution, maybe it can be wrapped around pdb.Pdb
and [explicitly declare what modules to skip](import pdb; pdb.Pdb(skip=['django.*']).set_trace()).
Something like:
import ipdb
def debug_step_error(step):
ipdb.IPdb(skip=['sure.*']).post_mortem(step.exc_traceback)
Issue Type
Versions & Configuration
Steps to reproduce (Expected and Actual Results)
I'm using behave and splinter with sure's
expect
. I replaced this step:With this implementation:
This tests is known to fail. The problem arises when the failure occurs. As recommended in behave's docs, I have my test runner (environment.py) setup to behave to open ipdb when a step fails.
The problem is that sure's internal
assert
hi-jacks the line number ipdb drops me into:Expected Result (same as what happens with the traditional assert)
Actual Result (sure hijacks drop-in point)
I have to type
u
3 times to go up, up, up to get to my own code.Is there any way to get sure and ipdb playing more nicely together?
Thanks for the time you spend working on this library. As a huge fan of RSpec/Capybara/Chai, it's godsend to have this syntax available via Python.