From dc306a22689901bfac970b637160b9916cd130ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 3 Nov 2024 14:23:13 +0100 Subject: [PATCH] dev-python/gfloat: Add nbval test dep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/942802 Signed-off-by: Michał Górny --- dev-python/gfloat/gfloat-0.4.ebuild | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/dev-python/gfloat/gfloat-0.4.ebuild b/dev-python/gfloat/gfloat-0.4.ebuild index 073c3dceaa005..8fb620eee7535 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 +}