commit: e804d9b4f23286ac0169ce612798cc4f616c97e9
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 17 06:36:53 2023 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Nov 17 07:57:05 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e804d9b4
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 <AT> gentoo.org>
dev-python/sympy/sympy-1.12.ebuild | 53 ++++++++++++++++++--------------------
1 file 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() {