Files
gentoo-zh/dev-python/daff/daff-1.4.2.ebuild
T
Zakk 0785e444d8 dev-python/daff: enable tests
Because upstream ships its tests as plain scripts that assert at import
and define no test functions, pytest would collect nothing; run each
test/test_*.py with ${EPYTHON} instead. test_sqlite.py needs the sqlite3
module, so add it to the test dependencies.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-21 13:02:26 +11:00

32 lines
603 B
Bash

# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{12..14} pypy3 )
inherit distutils-r1 pypi
DESCRIPTION="The daff can produce and apply tabular diffs"
HOMEPAGE="https://github.com/paulfitz/daff"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~riscv ~sparc ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
BDEPEND="
test? (
$(python_gen_impl_dep sqlite)
)
"
python_test() {
local t
for t in test/test_*.py; do
"${EPYTHON}" "${t}" || die "${t} failed with ${EPYTHON}"
done
}