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...@gmail.com> wrote:
> 
> Hi everyone!
> 
> It would be nice to have an approval testing plugin for pytest, but it seems 
> there's no perfect solution at the moment. A quick google search gave me this 
> and this, 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@python.org
> https://mail.python.org/mailman/listinfo/pytest-dev
_______________________________________________
pytest-dev mailing list
pytest-dev@python.org
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to