Re: RFC: adding pytest as a supported test framework

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Jacob Champion <jacob.champion@enterprisedb.com>, Jelte Fennema-Nio <postgres@jeltef.nl>, Daniel Gustafsson <daniel@yesql.se>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-06-14T16:17:25Z
Lists: pgsql-hackers
On 2024-06-14 09:11:11 -0700, Andres Freund wrote:
> On 2024-06-14 11:49:29 -0400, Tom Lane wrote:
> > Am I right in guessing that pytest will have nothing to do with that?
> 
> Looks like there's a plugin for pytest to support tap as output:
> https://pypi.org/project/pytest-tap/
> 
> However, it's not available as a debian package. I know that some folks just
> advocate installing dependencies via venv, but I personally don't think
> that'll fly. For one, it'll basically prevent tests being run by packagers.

If this were the blocker, I think we could just ship an output adapter
ourselves. pytest-tap is not a lot of code:
https://github.com/python-tap/pytest-tap/blob/main/src/pytest_tap/plugin.py

So either vendoring it or just writing an even simpler version ourselves seems
entirely feasible.