Skip to content

Commit

Permalink
python-utils-r1.eclass: epytest, error out on missing async plugin
Browse files Browse the repository at this point in the history
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 <[email protected]>
Closes: gentoo#35913
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Apr 1, 2024
1 parent 73c49f3 commit 1f35acd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eclass/python-utils-r1.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1f35acd

Please sign in to comment.