[pytest-dev] Fwd: Continuing on failures

Bruno Oliveira nicoddemus at gmail.com
Fri Mar 27 07:46:51 EDT 2020

Hi Maximilian,

On Thu, Mar 26, 2020 at 7:29 PM Maximilian Roos <m at maximilianroos.com>

> To prefix: as a long time user and evangelizer of pytest, a big thank you
> for the superb tool.

Thanks for the kind words, we appreciate it.

> As per that README, it only works on the first failure, because the test
> doesn't continue execution beyond that. *Is there any way of allowing
> execution to continue, without ripping up the internals of pytest?* My
> prior is "no", since the assertion rewrite still retains an assertion, and
> there's no hook for changing that.

Not at the moment I'm afraid.

I think it should be possible to implement a hook that transforms the AST,
which our rewriter would then call. I think, with this hook in place, you
would be able to rewrite assert statements into a function call of your
plugin, which would then be free to do whatever it wanted. If you are
interested, I suggest writing up a proposal in the issue tracker so it can
be discussed.


> Ref: a similar question I asked @okken
> https://github.com/okken/pytest-check/issues/32
> Thank you,
> Max
> _______________________________________________
> pytest-dev mailing list
> pytest-dev at python.org
> https://mail.python.org/mailman/listinfo/pytest-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20200327/bb2c463d/attachment.html>

More information about the pytest-dev mailing list