diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-11-17 07:36:53 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-11-17 08:57:05 +0100 |
commit | e804d9b4f23286ac0169ce612798cc4f616c97e9 (patch) | |
tree | 72ddc77ee6180ffecdd2ef56af1956da8fb72749 /dev-python/sympy | |
parent | dev-python/sympy: Fix running tests (diff) | |
download | gentoo-e804d9b4f23286ac0169ce612798cc4f616c97e9.tar.gz gentoo-e804d9b4f23286ac0169ce612798cc4f616c97e9.tar.bz2 gentoo-e804d9b4f23286ac0169ce612798cc4f616c97e9.zip |
dev-python/sympy: Run tests via pytest
Run tests via pytest, utilizing pytest-xdist. While this introduces
a few additional failures, it saves lots of time.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/sympy')
-rw-r--r-- | dev-python/sympy/sympy-1.12.ebuild | 53 |
1 files changed, 25 insertions, 28 deletions
diff --git a/dev-python/sympy/sympy-1.12.ebuild b/dev-python/sympy/sympy-1.12.ebuild index 3944647ef2e0..54a1c1d88d66 100644 --- a/dev-python/sympy/sympy-1.12.ebuild +++ b/dev-python/sympy/sympy-1.12.ebuild @@ -47,39 +47,36 @@ RDEPEND=" texmacs? ( app-office/texmacs ) " +EPYTEST_XDIST=1 +distutils_enable_tests pytest + src_test() { virtx distutils-r1_src_test } python_test() { - local color=True - [[ ${NO_COLOR} ]] && color=False - - "${EPYTHON}" - <<-EOF || die -n "Tests failed with ${EPYTHON}" - from sympy.testing.runtests import run_all_tests - - common = { - "verbose": True, - "colors": ${color}, - "force_colors": ${color}, - "blacklist": [ - # these require old version of antlr4 - "sympy/parsing/autolev/__init__.py", - "sympy/parsing/latex/__init__.py", - "sympy/parsing/tests/test_autolev.py", - "sympy/parsing/tests/test_latex.py", - # these fail on assertions inside LLVM - "sympy/parsing/tests/test_c_parser.py", - # hangs - "sympy/printing/preview.py", - ], - } - - run_all_tests( - test_kwargs=common, - doctest_kwargs=common, - ) - EOF + local EPYTEST_DESELECT=( + # require old version of antlr4 + sympy/parsing/tests/test_autolev.py + sympy/parsing/tests/test_latex.py + # crash due to assertions in sys-devel/llvm[debug] + sympy/parsing/tests/test_c_parser.py + + # TODO: pytest? + sympy/solvers/ode/tests/test_systems.py::test_linear_3eq_order1_type4_long_check + sympy/solvers/ode/tests/test_systems.py::test_linear_3eq_order1_type4_long_dsolve_dotprodsimp + + # either very slow or hanging + sympy/solvers/ode/tests/test_systems.py::test_linear_new_order1_type2_de_lorentz_slow_check + sympy/integrals/tests/test_failing_integrals.py::test_issue_15227 + sympy/matrices/tests/test_matrices.py::test_pinv_rank_deficient_when_diagonalization_fails + sympy/solvers/ode/tests/test_systems.py::test_nonlinear_3eq_order1_type1 + sympy/solvers/ode/tests/test_systems.py::test_nonlinear_3eq_order1_type3 + ) + + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + nonfatal epytest --veryquickcheck || + die -n "Tests failed with ${EPYTHON}" } python_install_all() { |