breakpoint / suspend on pytest error

When running pytest, I would like to be able to suspend the code when an error (assertion failure) is encountered, as if a breakpoint was set.

Is there any way to do this?  The only solution I've found is to re-run the test, with a breakpoint set at the place where the assertion error occurs (and if it doesn't always occur, then I have to add a conditional).

Thanks...

Please sign in to leave a comment.