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.
Via a longer case posted on stackoverflow, I found out that BaseException - or subclasses like pytest.Failed - skips the printing of the steps taken to produce the error.
fromhypothesis.statefulimportRuleBasedStateMachine, ruleclassRaisesProblem(RuleBasedStateMachine):
@rule()defoops(self):
raiseBaseException('The steps should be printed too!')
Test=RaisesProblem.TestCase
Suggested resolution: there is probably somewhere which catches Exception but should catch BaseException (perhaps re-raising HypothesisBaseException). Finding and fixing that might be enough, along with a regression test of course!
The text was updated successfully, but these errors were encountered:
Zac-HD
changed the title
Stateful testing: steps not printed if BaseException is raised
Stateful testing: steps not printed on pytest.fail()
Jul 1, 2018
Via a longer case posted on stackoverflow, I found out that BaseException - or subclasses like
pytest.Failed
- skips the printing of the steps taken to produce the error.Suggested resolution: there is probably somewhere which catches
Exception
but should catchBaseException
(perhaps re-raisingHypothesisBaseException
). Finding and fixing that might be enough, along with a regression test of course!The text was updated successfully, but these errors were encountered: