commit:     0a5c527fd7bf322afc3cd8e4438bef865d2e8fc1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May  3 09:35:40 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May  3 10:20:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a5c527f

dev-python/matplotlib: Run pytest directly

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/matplotlib/matplotlib-3.5.2.ebuild | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/dev-python/matplotlib/matplotlib-3.5.2.ebuild 
b/dev-python/matplotlib/matplotlib-3.5.2.ebuild
index b34037d20297..0aea928dc2d7 100644
--- a/dev-python/matplotlib/matplotlib-3.5.2.ebuild
+++ b/dev-python/matplotlib/matplotlib-3.5.2.ebuild
@@ -260,6 +260,13 @@ src_test() {
 }
 
 python_test() {
+       local EPYTEST_DESELECT=(
+               # broken by -Wdefault
+               
"tests/test_rcparams.py::test_validator_invalid[validate_strlist-arg6-MatplotlibDeprecationWarning]"
+               
"tests/test_rcparams.py::test_validator_invalid[validate_strlist-arg7-MatplotlibDeprecationWarning]"
+               tests/test_testing.py::test_warn_to_fail
+       )
+
        # we need to rebuild mpl against bundled freetype, otherwise
        # over 1000 tests will fail because of mismatched font rendering
        grep -v system_freetype "${BUILD_DIR}"/setup.cfg \
@@ -269,7 +276,9 @@ python_test() {
        distutils-r1_python_compile -j1 --build-lib="${BUILD_DIR}"/test-lib
        local -x PYTHONPATH=${BUILD_DIR}/test-lib:${PYTHONPATH}
 
-       "${EPYTHON}" -c "import sys, matplotlib as m; 
sys.exit(m.test(argv=['-m', 'not network'], verbosity=2))" || die
+       # speed tests up
+       local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+       nonfatal epytest --pyargs matplotlib -m "not network" || die
 }
 
 python_install() {

Reply via email to