summaryrefslogtreecommitdiff
path: root/dev-python/bpython
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-06-03 19:25:09 +0200
committerMichał Górny <mgorny@gentoo.org>2020-06-03 19:27:56 +0200
commit993386b0a18dd0a184f2102dfc8d1a5bc6f223fb (patch)
tree658426c13cbc17ad064dc5db8b6f4523c9415048 /dev-python/bpython
parent749c5e8bc749bb0162fe1be914636bf1494e40b0 (diff)
downloadgentoo-993386b0a18dd0a184f2102dfc8d1a5bc6f223fb.tar.gz
gentoo-993386b0a18dd0a184f2102dfc8d1a5bc6f223fb.tar.bz2
gentoo-993386b0a18dd0a184f2102dfc8d1a5bc6f223fb.zip
dev-python/bpython: Fix tests
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/bpython')
-rw-r--r--dev-python/bpython/bpython-0.19.ebuild32
1 files changed, 10 insertions, 22 deletions
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
}