Re: RFC: adding pytest as a supported test framework

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RFC: adding pytest as a supported test framework
Date: 2024-06-14 16:17:25
Message-ID: 20240614161725.x4x7btzvp37vn2h4@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2024-06-14 16:21:23 jsonpath: Missing regex_like && starts with Errors?
Previous Message Andres Freund 2024-06-14 16:11:11 Re: RFC: adding pytest as a supported test framework