You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using behave and splinter with sure's expect. I replaced this step:
@then('it will display the motto')defstep_impl(context):
foo='bar'assertcontext.browser.is_text_present('Cool beans.')
With this implementation:
@then('it will display the motto')defstep_impl(context):
expect(context.browser.is_text_present('Cool beans.')).to.be.true
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.
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()).
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.
The text was updated successfully, but these errors were encountered: