[pytest-dev] Approval testing plugin for pytest

Vasily Kuznetsov kvas.it at gmail.com
Wed Apr 18 10:42:22 EDT 2018


Oh, this looks pretty good! I will try it out. Thank you, Brian.

Cheers,
Vasily

On Wed, Apr 18, 2018 at 12:23 AM Brian Okken <variedthoughts at gmail.com>
wrote:

> I have seen something like what you are describing here:
> https://pypi.org/project/pytest-regtest/
>
> - Brian Okken
>
> On Apr 17, 2018, at 2:22 PM, Vasily Kuznetsov <kvas.it at gmail.com> wrote:
>
> Hi everyone!
>
> It would be nice to have an approval testing <http://approvaltests.com/>
> plugin for pytest, but it seems there's no perfect solution at the moment.
> A quick google search gave me this
> <https://github.com/approvals/ApprovalTests.Python> and this
> <https://gist.github.com/npryce/9c4dc2e0ea7eaf6e27fc>, but that's kind of
> far from ideal.
>
> What I would like to have is the ability to mark a test as approval test
> and then the framework would compare the return value of the test function
> to the approved output, produce error diffs, allow approving new output,
> etc. It would also play nice with fixtures, parametrization and other
> pytest features so that a separate approved result would be generated for
> each test item, stored in a file with some useful name and all of this
> would be transparent for the developer. A diffing tool for approving the
> outputs could be specified via configuration parameter or an environment
> variable.
>
> Does this sounds like something that you have seen? If not, I will
> probably try to build it (most likely from scratch, since not much of the
> functionality of ApprovalTest.Python would be useful here and I feel like I
> would struggle against their approval naming code) and would appreciate any
> advice.
>
> Cheers,
> Vasily
>
> _______________________________________________
> 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/20180418/fc461930/attachment.html>


More information about the pytest-dev mailing list