Re: RFC: adding pytest as a supported test framework
| От | Andres Freund |
|---|---|
| Тема | Re: RFC: adding pytest as a supported test framework |
| Дата | |
| Msg-id | froy7mvxq76o2asuyzajyvaqelzuv372xsylfvhlhkvis7ojr4@23lg5adaxvdw обсуждение исходный текст |
| Ответ на | Re: RFC: adding pytest as a supported test framework (Jelte Fennema-Nio <postgres@jeltef.nl>) |
| Ответы |
Re: RFC: adding pytest as a supported test framework
|
| Список | pgsql-hackers |
Hi, On 2026-01-07 00:49:28 +0100, Jelte Fennema-Nio wrote: > On Wed, 7 Jan 2026 at 00:17, Andres Freund <andres@anarazel.de> wrote: > > I'm somewhat sceptical that the .venv support should be introduced together > > with the rest of this. > > Could you expand a bit on this? My thinking was that people have a > tendency to get confused by python dependency management (because > there's too many options to do it). So having an easy documented and > supported way to do it seemed like a good idea to have people not get > frustrated. > Would you rather have it only be documented how to install the python > dependencies? And not have meson/autoconf automatically detect the > .venv? > > To be clear, if it was only pytest then recommending "pipx install > pytest" would probably be easiest, but it seems like we'll at least > want cryptography for the tests Jacob is writing. > > And I'm also thinking ahead a bit towards being able to use (a > specific version of) ruff for formatting & linting of python code. See > also[1] I mainly think you're doing too much at once. There may be arguments for recognizing a .venv in the build or source directory. But it just seems like a separate project than the basic infrastructure to have python tests. I'd start with just documenting the set of packages that are required and let the user deal with the rest. Then, in a subsequent step, we can discuss whether or not we want the venv support. I'd also not include support for MTEST_SUITES, nor would I remove an existing test as part of this thread. I'd not include something like src/test/pytest/libpq/_generated_errors.py either, that seems orthogonal to me. Getting something that's not yet complete, but already 288kB, merged, is no small feat... Greetings, Andres Freund
В списке pgsql-hackers по дате отправления: