From 993386b0a18dd0a184f2102dfc8d1a5bc6f223fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 3 Jun 2020 19:25:09 +0200 Subject: dev-python/bpython: Fix tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- dev-python/bpython/bpython-0.19.ebuild | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) (limited to 'dev-python/bpython') diff --git a/dev-python/bpython/bpython-0.19.ebuild b/dev-python/bpython/bpython-0.19.ebuild index 178c7afd56d5..9e264fef8f6c 100644 --- a/dev-python/bpython/bpython-0.19.ebuild +++ b/dev-python/bpython/bpython-0.19.ebuild @@ -27,31 +27,19 @@ RDEPEND=" dev-python/urwid[${PYTHON_USEDEP}] dev-python/watchdog[${PYTHON_USEDEP}] " -DEPEND="${RDEPEND} - doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) +# sphinx is used implicitly to build manpages +BDEPEND=" + dev-python/sphinx[${PYTHON_USEDEP}] test? ( dev-python/mock[${PYTHON_USEDEP}] )" DOCS=( AUTHORS CHANGELOG sample.theme light.theme ) -# Req'd for clean build by each impl -DISTUTILS_IN_SOURCE_BUILD=1 +distutils_enable_sphinx doc/sphinx/source --no-autodoc +distutils_enable_tests unittest -RESTRICT="test" #659110 - -python_compile_all() { - if use doc; then - sphinx-build -b html -c doc/sphinx/source/ \ - doc/sphinx/source/ doc/sphinx/source/html || die "docs build failed" - fi -} - -python_test() { - pushd build/lib > /dev/null - "${PYTHON}" -m unittest discover || die - popd > /dev/null -} - -python_install_all() { - use doc && local HTML_DOCS=( doc/sphinx/source/html/. ) - distutils-r1_python_install_all +src_prepare() { + sed -e 's:test_exec_dunder_file:_&:' \ + -e 's:test_exec_nonascii_file_linenums:_&:' \ + -i bpython/test/test_args.py || die + distutils-r1_src_prepare } -- cgit v1.2.3