Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHoFE-00Avmu-F6 for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Jun 2024 17:28:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sHoFC-004UsC-7Y for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Jun 2024 17:28:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHoFB-004Us4-TW for pgsql-hackers@lists.postgresql.org; Thu, 13 Jun 2024 17:28:14 +0000 Received: from mail-yb1-f171.google.com ([209.85.219.171]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sHoF9-0019VC-TL for pgsql-hackers@postgresql.org; Thu, 13 Jun 2024 17:28:13 +0000 Received: by mail-yb1-f171.google.com with SMTP id 3f1490d57ef6-dfde5ae0aaeso1568806276.1 for ; Thu, 13 Jun 2024 10:28:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718299691; x=1718904491; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=27WfzDYkf6pZx2iMOdncfRRRrNnVD1DKOnuLqeiFFiM=; b=szWpOChpwoEsIVzwz+0Fr0RYVfJHorLFmiKRhUSc68gQ7EIyte/jeD92vX56ftawem lGxsmuyBUnNpSFvbCxE68rxgmRhoMnKfXnOJ2JJzsin1w5oezTuHUlF5P5NaILdW/Jy6 Y1RVfHfG4LS5b5FzhIyU/Jj+9war6/Tfv8pjS2CW/cwW8DdLsk1Vm4V6XSxAtDwFktz/ Zw1zzpRn+ZaH4siVET9x1rm35r/4789grq8Q4qQOI9ylGeSCzoMydbRjJjdrIenMYemb 0rxnlBDYYPBtabXgZAIHTQQ2UBsMhmSk31k8sTyYWwhgj8x1yP/nTeAmmO/xDy3D82wQ LzlA== X-Forwarded-Encrypted: i=1; AJvYcCV4Sq+l2B9Z1qKnQTM80TKLmoMxDggNN6wOaav0pbAmcWzYOfXKMVhWWpMtTNEYUnuwiunND0qr2qZPoj/Sib1k1SCKW5HTgwDezwrO X-Gm-Message-State: AOJu0YyvdCXOSc+ctMcrw20YAb+Esm2pmnlGvJmvDJHDlQ3/RC/ZjhBt a4KDGGkEeIKJ4fq/1xBbHhb/MB8fBvlZLVLWmIR3cvhiUM4NldyxZyrsy17qksly2ZXzfAPvnpB /xVg+/q2M61INJMQHkLUOkhFXJDUU5Uhddo+vfA== X-Google-Smtp-Source: AGHT+IF35V1xwMQ3idv7QQzbQs2/gabLOxwe4lMeDQ1KrNno356KdBkRNJos/i6JpsPYP1A7RjNJa8tceeVE1Inn8Fw= X-Received: by 2002:a25:6602:0:b0:dfe:5405:e8df with SMTP id 3f1490d57ef6-dff1538177amr132414276.17.1718299691119; Thu, 13 Jun 2024 10:28:11 -0700 (PDT) MIME-Version: 1.0 References: <20240610200411.byj6sv2vpgol6wcf@awork3.anarazel.de> <20240612155040.u6cvatdb5tiwcxci@awork3.anarazel.de> <1799088.1718291987@sss.pgh.pa.us> In-Reply-To: <1799088.1718291987@sss.pgh.pa.us> From: Jelte Fennema-Nio Date: Thu, 13 Jun 2024 19:28:00 +0200 Message-ID: Subject: Re: RFC: adding pytest as a supported test framework To: Tom Lane Cc: Robert Haas , Daniel Gustafsson , Andres Freund , Jacob Champion , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 13 Jun 2024 at 17:19, Tom Lane wrote: > I wonder if we should be checking out some of the other newer > languages that were mentioned upthread. If this is actually something that we want to seriously evaluate, I think that's a significant effort. And I think the people that want a language would need to step in to make that effort. So far Jacob[1], Alexander[2] and me[3] seem to be doing that for Python, and Sutou has done that for Ruby[4]. [1]: https://github.com/pgbouncer/pgbouncer/tree/master/test [2]: https://github.com/jchampio/pg-pytest-suite [3]: https://github.com/postgrespro/testgres [4]: https://github.com/pgroonga/pgroonga/blob/main/test/test-streaming-replication.rb > It feels like going to > Python here will lead to having two testing infrastructures with > mas-o-menos the same capabilities, leaving us with a situation > where people have to know both languages in order to make sense of > our test suite. I find it hard to picture that as an improvement > over the status quo. You don't have to be fluent in writing Python to be able to read and understand tests written in it. As someone familiar with Python I can definitely read our test suite, and I expect everyone smart enough to be fluent in Perl to be able to read and understand Python with fairly little effort too. I think having significantly more tests being written, and those tests being written faster and more correctly, is definitely worth the slight mental effort of learning to read two very similarly looking scripting languages (they both pretty much looking like pseudo code).