Add "pytest-import-check" to EPYTEST_PLUGINS automatically when using
import-check.  This also implicitly overrides the default behavior
of enabling all plugins, and instead runs with just the import-check
plugin loaded.

Signed-off-by: Michał Górny <[email protected]>
---
 eclass/distutils-r1.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index b7f5045e60bd9..8fc92cf4fca5c 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -551,6 +551,7 @@ distutils_enable_tests() {
        case ${1} in
                import-check)
                        test_pkgs+=' 
dev-python/pytest-import-check[${PYTHON_USEDEP}]'
+                       EPYTEST_PLUGINS+=( pytest-import-check )
                        ;&
                pytest)
                        test_pkgs+=' 
>=dev-python/pytest-7.4.4[${PYTHON_USEDEP}]'

Reply via email to