Re: RFC: adding pytest as a supported test framework

From: Sutou Kouhei <kou(at)clear-code(dot)com>
To: jacob(dot)champion(at)enterprisedb(dot)com
Cc: postgres(at)jeltef(dot)nl, noah(at)leadboat(dot)com, andres(at)anarazel(dot)de, andrew(at)dunslane(dot)net, pgsql-hackers(at)postgresql(dot)org
Subject: Re: RFC: adding pytest as a supported test framework
Date: 2024-06-12 21:40:01
Message-ID: 20240613.064001.1569077497664390798.kou@clear-code.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

(I don't have an opinion which language should be selected
here.)

In <CAOYmi+mA7-uNqpY-0jNZY=fE-QsbfeM1j5Mc-vu1Xm+=B8NOXA(at)mail(dot)gmail(dot)com>
"Re: RFC: adding pytest as a supported test framework" on Wed, 12 Jun 2024 12:31:23 -0700,
Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> wrote:

> - I like Ruby as a language but have no experience using it for
> testing. (RSpec did come up during the unconference session and
> subsequent hallway conversations.)

If we want to select Ruby, I can help. (I'm a Ruby committer
and a maintainer of a testing framework bundled in Ruby.)

I'm using Ruby for PGroonga's tests that can't be covered by
pg_regress. For example, streaming replication related
tests. PGroonga has a small utility for it:
https://github.com/pgroonga/pgroonga/blob/main/test/helpers/sandbox.rb

Here is a streaming replication test with it:
https://github.com/pgroonga/pgroonga/blob/main/test/test-streaming-replication.rb

I'm using test-unit as testing framework that is bundled in
Ruby: https://github.com/test-unit/test-unit/

I don't recommend that we use RSpec as testing framework
even if we select Ruby. RSpec may change API. (RSpec did it
several times in the past.) If testing framework changes API, we
need to rewrite our tests to adapt the change.

I'll never change test-unit API because I don't want to
rewrite existing tests.

Thanks,
--
kou

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2024-06-12 21:42:29 Re: Harmonizing pg_bsd_indent parameter names
Previous Message Tom Lane 2024-06-12 21:33:34 Re: Harmonizing pg_bsd_indent parameter names