summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-05-11 07:37:43 +0200
committerMichał Górny <mgorny@gentoo.org>2024-05-11 07:38:18 +0200
commitf9ff6d2517c5d25dea8a617621101ff39d2640fe (patch)
tree0f7fa2197aae45539c7d2ef29638055f259ea8cc /dev-python
parentdev-python/pyproject-fmt: Bump to 2.0.2 (diff)
downloadgentoo-f9ff6d2517c5d25dea8a617621101ff39d2640fe.tar.gz
gentoo-f9ff6d2517c5d25dea8a617621101ff39d2640fe.tar.bz2
gentoo-f9ff6d2517c5d25dea8a617621101ff39d2640fe.zip
dev-python/ini2toml: Move pyproject-fmt dep under test-rust
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/ini2toml/ini2toml-0.14.ebuild27
1 files changed, 21 insertions, 6 deletions
diff --git a/dev-python/ini2toml/ini2toml-0.14.ebuild b/dev-python/ini2toml/ini2toml-0.14.ebuild
index ede0b552f23d..cdf1678fcf02 100644
--- a/dev-python/ini2toml/ini2toml-0.14.ebuild
+++ b/dev-python/ini2toml/ini2toml-0.14.ebuild
@@ -17,6 +17,7 @@ HOMEPAGE="
LICENSE="MPL-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+IUSE="test-rust"
RDEPEND="
>=dev-python/packaging-20.7[${PYTHON_USEDEP}]
@@ -27,20 +28,34 @@ BDEPEND="
dev-python/setuptools-scm[${PYTHON_USEDEP}]
test? (
dev-python/configupdater[${PYTHON_USEDEP}]
- >=dev-python/pyproject-fmt-0.4.0[${PYTHON_USEDEP}]
dev-python/tomli[${PYTHON_USEDEP}]
dev-python/tomlkit[${PYTHON_USEDEP}]
+ test-rust? (
+ >=dev-python/pyproject-fmt-0.4.0[${PYTHON_USEDEP}]
+ )
)
"
distutils_enable_tests pytest
-EPYTEST_IGNORE=(
- # validate_pyproject is not packaged
- tests/test_examples.py
-)
-
src_prepare() {
sed -i -e 's:--cov ini2toml --cov-report term-missing::' setup.cfg || die
distutils-r1_src_prepare
}
+
+python_test() {
+ local EPYTEST_IGNORE=(
+ # validate_pyproject is not packaged
+ tests/test_examples.py
+ )
+ local EPYTEST_DESELECT=()
+
+ if ! has_version ">=dev-python/pyproject-fmt-0.4.0[${PYTHON_USEDEP}]"; then
+ EPYTEST_DESELECT+=(
+ tests/test_cli.py::test_auto_formatting
+ )
+ fi
+
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest
+}