summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-11-03 14:23:13 +0100
committerMichał Górny <mgorny@gentoo.org>2024-11-03 14:30:03 +0100
commitdc306a22689901bfac970b637160b9916cd130ea (patch)
treef3fd2f90bdffd490eed9b74eb7a1b0900e04c2e4 /dev-python/gfloat
parentdev-python/pylibmc: Remove old (diff)
downloadgentoo-dc306a22689901bfac970b637160b9916cd130ea.tar.gz
gentoo-dc306a22689901bfac970b637160b9916cd130ea.tar.bz2
gentoo-dc306a22689901bfac970b637160b9916cd130ea.zip
dev-python/gfloat: Add nbval test dep
Closes: https://bugs.gentoo.org/942802 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/gfloat')
-rw-r--r--dev-python/gfloat/gfloat-0.4.ebuild29
1 files changed, 21 insertions, 8 deletions
diff --git a/dev-python/gfloat/gfloat-0.4.ebuild b/dev-python/gfloat/gfloat-0.4.ebuild
index 073c3dceaa00..8fb620eee753 100644
--- a/dev-python/gfloat/gfloat-0.4.ebuild
+++ b/dev-python/gfloat/gfloat-0.4.ebuild
@@ -17,6 +17,7 @@ HOMEPAGE="
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="test-rust"
RDEPEND="
dev-python/more-itertools[${PYTHON_USEDEP}]
@@ -25,16 +26,28 @@ RDEPEND="
BDEPEND="
test? (
dev-python/ml-dtypes[${PYTHON_USEDEP}]
+ test-rust? (
+ dev-python/nbval[${PYTHON_USEDEP}]
+ )
)
"
distutils_enable_tests pytest
-EPYTEST_IGNORE=(
- # require jax
- docs/source/03-value-tables.ipynb
- docs/source/04-benchmark.ipynb
- test/test_jax.py
- # requires mx (possibly git version), torch
- test/test_microxcaling.py
-)
+python_test() {
+ local EPYTEST_IGNORE=(
+ # require jax
+ docs/source/03-value-tables.ipynb
+ docs/source/04-benchmark.ipynb
+ test/test_jax.py
+ # requires mx (possibly git version), torch
+ test/test_microxcaling.py
+ )
+
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ if has_version "dev-python/nbval[${PYTHON_USEDEP}]"; then
+ epytest -p nbval
+ else
+ epytest -o addopts=
+ fi
+}