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 1sHTh5-0080sP-JJ for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Jun 2024 19:31:39 +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 1sHTh3-005bva-9r for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Jun 2024 19:31:38 +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 1sHTh2-005bv4-W0 for pgsql-hackers@lists.postgresql.org; Wed, 12 Jun 2024 19:31:37 +0000 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sHTh1-0010LY-C9 for pgsql-hackers@postgresql.org; Wed, 12 Jun 2024 19:31:36 +0000 Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-43fdb797ee2so834891cf.3 for ; Wed, 12 Jun 2024 12:31:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1718220694; x=1718825494; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zzmkkSBgqynHDa52JRCvOJ/onVFop48QHYFFsSLfT5o=; b=LWaqrnuBegOlqCe1cWqQVAJKNe3pFtYJfX+dlftN59Q/uJLqQ8nqGA/Kabe1JCb46C 9aakEQLKqvcMBHAtluGjv5hrIB3hc83Ti065LznHxXtlA4bLefF3rqoBrkYExpksmcyf XqT6KOYcz24s08Hs/Ii//BEjR8vDEGi6YOcC5+qt6BIhxD1Qghgqdio2w0kNUafT5yNw erbOJAdCZSEJDIrzWu8I37m6f4OZOEzV7OHr5bbdL8rq04b9gy+Sl3GgtGzo0u82mjE3 nP6RwyFYaOi/pV0iFc548eENR2KR7FbMAqT5YATFTwgV4qZ1RQDoWCy0sn09hzk2WfXR jO0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718220694; x=1718825494; h=content-transfer-encoding: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=zzmkkSBgqynHDa52JRCvOJ/onVFop48QHYFFsSLfT5o=; b=P6Nft6IMC9xQ/zYIvNdfv4xCt3aojs4HKDAsT2uxaCTyzwH74icWQkw2DCOc8urRsI a78259aBNVmXfwGoOYCUXAA6IW+WRZkMCdEL8Nx+HCCMwuKjZy2U/KGjrhUjtWh9t8y2 WVHD6ATfecJDnjtmA0OR1mwRZ3/eNGpW7MQz0FiG4vSMotRTnqPFpDqdNTfYPB9TtMhZ MLundmHyYZ5R2POHlTpOFFWWzeYKzu9Jr0jz91Di1VsQnRHNmJ2wxb6MBKUolU0lmT2q z9pl+J1vQzzfZ/lYbygofZzVDD0DMs6FzavVWrslrjQEPNG0TqF6ko9Az5V6O55NKDUF TuJg== X-Forwarded-Encrypted: i=1; AJvYcCVBfYom7ixv6EI5g1VjklPKeVaeL7YopoCjBbwghWJ6tW09FOWPGItSvYnab3eIrEBDk/m5GHll+bw2aAQJT/4CVu2IAI+x01fYTtfQ X-Gm-Message-State: AOJu0YzJbhUlEt3MbTIhWO5u5N5oyvmWT35oKhHTK7E0MPGO5vu2K35r zfy53atBm+Nsa0S2+CB4UKfinrwDdnH0I3vRwGvL/FowQ515aIFtHYe/JeNfaVQoT/C0VkVlNXS Tpaj7nCF+r391Smi/oXAk077itwKm/hZNrKD9 X-Google-Smtp-Source: AGHT+IEHw+BZbPEbAPcV2/Yyn/IuAEToP0o7hzZ4jS2JQ9AszA1kSkS/sT9KX7PNucWRpuyIW8EwGBpgNTK0bte0daU= X-Received: by 2002:a05:6214:311d:b0:6b0:91d4:5821 with SMTP id 6a1803df08f44-6b1a62a3efemr26530346d6.28.1718220694495; Wed, 12 Jun 2024 12:31:34 -0700 (PDT) MIME-Version: 1.0 References: <20240610200411.byj6sv2vpgol6wcf@awork3.anarazel.de> <00c5efe6-1abb-42f8-a9a7-ed3a055c4b92@dunslane.net> <20240611014911.khxuai5fy2ssbmiw@awork3.anarazel.de> <20240611234829.9d@rfd.leadboat.com> In-Reply-To: From: Jacob Champion Date: Wed, 12 Jun 2024 12:31:23 -0700 Message-ID: Subject: Re: RFC: adding pytest as a supported test framework To: Jelte Fennema-Nio Cc: Noah Misch , Andres Freund , Andrew Dunstan , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jun 12, 2024 at 4:40=E2=80=AFAM Jelte Fennema-Nio wrote: > I think C#, Java, Go, Rust, Kotlin, and Swift would be acceptable > choices for me (and possibly some more). They allow some type of > introspection, they have a garbage collector, and their general > tooling is quite good. > > But I think a dynamically typed scripting language is much more > fitting for writing tests like this. I love static typing for > production code, but imho it really doesn't have much benefit for > tests. +1. I write mostly protocol mocks and glue code in my authn testing, to try to set up the system into some initial state and then break it. Of the languages mentioned here, I've only used C#, Java, and Go. If I had to reimplement my tests, I'd probably reach for Go out of all of those, but the glue would still be more painful than it probably needs to be. > As scripting languages go, the ones that are still fairly heavily in > use are Javascript, Python, Ruby, and PHP. I think all of those could > probably work, but my personal order of preference would be Python, > Ruby, Javascript, PHP. - Python is the easiest language I've personally used to glue things together, bar none. - 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.) - Javascript is a completely different mental model from what we're used to, IMO. I think we're likely to spend a lot of time fighting the engine unless everyone is very clear on how it works. - I don't see a use case for PHP here. > TO CLARIFY: This thread is not a proposal to replace Perl with Python. > It's a proposal to allow people to also write tests in Python. +1. It doesn't need to replace anything. It just needs to help us do more things than we're currently doing. --Jacob