From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 95F16158041 for ; Fri, 29 Mar 2024 15:57:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 39A69E2A76; Fri, 29 Mar 2024 15:57:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DF63EE2A72 for ; Fri, 29 Mar 2024 15:57:00 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH] python-utils-r1.eclass: epytest, error out on missing async plugin Date: Fri, 29 Mar 2024 16:56:54 +0100 Message-ID: <20240329155654.703917-1-mgorny@gentoo.org> X-Mailer: git-send-email 2.44.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 79250a0d-4696-4cbb-b8ec-976cd7eaaaae X-Archives-Hash: 7c8abae4d4bf6beff543949c1a7a98e2 Explicitly error out if epytest is run without an appropriate async plugin, and the test suite contains async tests. Currently, these tests are skipped with a warning but that is usually a mistake, and one can easily miss it when pytest-asyncio or a similar plugin is installed on the test system. However, a missing dependency can result in the tests being skipped afterwards on the tinderbox. Signed-off-by: Michał Górny --- eclass/python-utils-r1.eclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index caa39813feec..bbf751399476 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1349,6 +1349,9 @@ epytest() { # override filterwarnings=error, we do not really want -Werror # for end users, as it tends to fail on new warnings from deps -Wdefault + # however, do error out if the package failed to load + # an appropriate async plugin + -Werror::pytest.PytestUnhandledCoroutineWarning # override color output "--color=${color}" # count is more precise when we're dealing with a large number -- 2.44.0