Re: Direction for test frameworks: Perl TAP vs. Python/pytest

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Aleksander Alekseev <aleksander(at)tigerdata(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Melanie Plageman <melanieplageman(at)gmail(dot)com>
Subject: Re: Direction for test frameworks: Perl TAP vs. Python/pytest
Date: 2026-06-16 23:02:13
Message-ID: ajHV9YlHMf-5djj7@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 16, 2026 at 12:20:12PM -0400, Tom Lane wrote:
> Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> writes:
>> It would probably be pretty easy to do that in slices. Backport the
>> Python core, then develop the replacement for a segment of related
>> tests as a reviewable and backportable chunk. That lets us refactor
>> the testing APIs as we go, and if there are failures after backport,
>> at least it's just that one area of the tests and not "the whole
>> thing".
>
> Makes sense.

Backporting the core Python infrastructure sounds like a first
mandatory step here. Under time-pressure with a release timeline,
complicated/sensitive fixes may require tests across all the stable
branches. Not having to translate the same test across two
infrastructures would save a lot of brain resources.

Backporting changes of the tests into the new Python infrastructure
would make backpatching less complicated, indeed. It is much more
common for me to add tests to existing scripts than create new ones.
For a routine fix, I'd be OK to switch an existing test from perl to
Python before doing a backpatch and expanding a script. Now, I don't
think that we should close the door to the possibility of having to
add some perl code in an existing perl script if we are under a time
constraint (imagine in the security area).

The only thing I'd argue to avoid is having to maintain two versions
of the same test across *two* infrastructures.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2026-06-16 23:06:49 Re: Direction for test frameworks: Perl TAP vs. Python/pytest
Previous Message Robert Haas 2026-06-16 22:57:04 Re: use of SPI by postgresImportForeignStatistics