Re: RFC: adding pytest as a supported test framework

From: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Andres Freund <andres(at)anarazel(dot)de>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Subject: Re: RFC: adding pytest as a supported test framework
Date: 2026-01-19 11:34:37
Message-ID: CAJ7c6TMt-aXXmtO9JgXEsh4UvWrPQbW4_CnRxftAacW0QM9a5g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

> v10 attached to resolve merge conflicts.

I tested and reviewed patches 0001 .. 0003 on Linux x64. All in all
the code is in a pretty good shape except for several TODOs:

```
# TODO: proper quoting
v = v.replace("\\", "\\\\")
v = v.replace("'", "\\'")
v = "'{}'".format(v)
```

and:

```
# TODO: rather than using callback(), consider explicitly signaling
# the fn() implementation to stop early if we get an exception.
# Otherwise we'll hang until the end of the timeout.
self._thread = threading.Thread(target=_bg)
self.callback(self._join)
```

Are there any plans to rewrite this code? If not, maybe there should
be no TODOs in the comments?

Also leaving this:

```
# XXX interacts poorly with testwrap's boilerplate diagnostics
# self.print("TAP version 13")
```

... doesn't seem to be particularly useful. I see XXX but what are
actionable items? If there are none, perhaps there shouldn't be XXX
here.

I haven't looked at 0004 and 0005.

--
Best regards,
Aleksander Alekseev

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2026-01-19 11:37:52 RE: code contributions for 2025, WIP version
Previous Message Fujii Masao 2026-01-19 11:22:04 Re: file_fdw: Support multi-line HEADER option.