Re: RFC: adding pytest as a supported test framework - Mailing list pgsql-hackers

From Noah Misch
Subject Re: RFC: adding pytest as a supported test framework
Date
Msg-id 20240612205657.2c@rfd.leadboat.com
Whole thread Raw
In response to Re: RFC: adding pytest as a supported test framework  (Jelte Fennema-Nio <postgres@jeltef.nl>)
List pgsql-hackers
On Wed, Jun 12, 2024 at 01:40:30PM +0200, Jelte Fennema-Nio wrote:
> On Wed, 12 Jun 2024 at 01:48, Noah Misch <noah@leadboat.com> wrote:
> > I also want the initial scope to be the new language coexisting with the
> > existing Perl tests.  If a bulk translation ever happens, it should happen
> > long after the debut of the new framework.  That said, I don't much trust a
> > human-written bulk language translation to go through without some tests
> > accidentally ceasing to test what they test in Perl today.
> 
> I definitely don't think we should rewrite all the tests that we have
> in Perl today into some other language. But I do think that whatever
> language we choose, that language should make it as least as easy to
> write tests, as easy to read them and as easy to see that they are
> testing the intended thing, as is currently the case for Perl.
> Rewriting a few Perl tests into the new language, even if not merging
> the rewrite, is a good way of validating that imho.

Agreed.

> PS. For PgBouncer I actually hand-rewrote all the tests that we had in
> bash (which is the worst testing language ever) in Python and doing so
> actually found more bugs in PgBouncer code that our bash tests
> wouldn't catch. So it's not necessarily the case that you lose
> coverage by rewriting tests.

Yep.



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions
Next
From: Nathan Bossart
Date:
Subject: Re: Allow non-superuser to cancel superuser tasks.