public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] python-utils-r1.eclass: epytest, error out on missing async plugin
@ 2024-03-29 15:56 Michał Górny
  0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2024-03-29 15:56 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Michał Górny

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 <mgorny@gentoo.org>
---
 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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-29 15:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-29 15:56 [gentoo-dev] [PATCH] python-utils-r1.eclass: epytest, error out on missing async plugin Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox