summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-01-17 19:23:05 +0100
committerMichał Górny <mgorny@gentoo.org>2020-01-17 19:35:49 +0100
commit3caee498dc04ed6f499945d7f390b5820c2ce6ac (patch)
treed1edbb687dc32c29c9798704f8fc0334d44d3275 /dev-python/pypy3
parentdev-python/pypy: Skip broken tests (diff)
downloadgentoo-3caee498dc04ed6f499945d7f390b5820c2ce6ac.tar.gz
gentoo-3caee498dc04ed6f499945d7f390b5820c2ce6ac.tar.bz2
gentoo-3caee498dc04ed6f499945d7f390b5820c2ce6ac.zip
dev-python/pypy3: Get tests to pass
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pypy3')
-rw-r--r--dev-python/pypy3/pypy3-7.3.0.ebuild61
1 files changed, 59 insertions, 2 deletions
diff --git a/dev-python/pypy3/pypy3-7.3.0.ebuild b/dev-python/pypy3/pypy3-7.3.0.ebuild
index d584b9c26c73..731160f9b9eb 100644
--- a/dev-python/pypy3/pypy3-7.3.0.ebuild
+++ b/dev-python/pypy3/pypy3-7.3.0.ebuild
@@ -35,7 +35,10 @@ RDEPEND="
)
!<dev-python/pypy3-bin-7.3.0:0"
DEPEND="${RDEPEND}
- test? ( ${PYTHON_DEPS} )"
+ test? (
+ ${PYTHON_DEPS}
+ !!dev-python/pytest-forked
+ )"
pkg_setup() {
use test && python-any-r1_pkg_setup
@@ -54,6 +57,59 @@ src_prepare() {
eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
popd > /dev/null || die
+ # tests are copied from cpython and apparently not adjusted to pypy3
+ # or marked XFAIL
+ sed -i -e 's:test_runeval_step:_&:' \
+ lib-python/3/test/test_bdb.py || die
+ sed -i -e 's:test_set_nomemory:_&:' \
+ -e '/class PyMemDebugTests/i@unittest.skip("Broken on pypy3")' \
+ lib-python/3/test/test_capi.py || die
+ sed -i -e 's:test_crashing_decode_handler:_&:' \
+ lib-python/3/test/test_codeccallbacks.py || die
+ sed -i -e 's:test_unicode:_&:' \
+ lib-python/3/test/test_dbm_gnu.py || die
+ sed -i -e 's:test_jumpy:_&:' \
+ lib-python/3/test/test_dis.py || die
+ sed -i -e 's:test_generator_doesnt_retain_old_exc:_&:' \
+ -e 's:test_generator_finalizing_and_exc_info:_&:' \
+ -e 's:test_generator_leaking:_&:' \
+ lib-python/3/test/test_exceptions.py || die
+ sed -i -e 's:test_locale:_&:' \
+ lib-python/3/test/test_format.py || die
+ sed -i -e 's:test_ast_line_numbers:_&:' \
+ -e 's:test_backslashes_in_string_part:_&:' \
+ lib-python/3/test/test_fstring.py || die
+ sed -i -e 's:test_decompressor_bug_28275:_&:' \
+ lib-python/3/test/test_lzma.py || die
+ sed -i -e 's:test_listdir_bytes_like:_&:' \
+ -e 's:test_putenv:_&:' \
+ lib-python/3/test/test_posix.py || die
+ sed -i -e 's:test_auto_history:_&:' \
+ -e 's:test_history_size:_&:' \
+ lib-python/3/test/test_readline.py || die
+ sed -i -e 's:CheckDMLDoesNotAutoCommitBefore:_&:' \
+ -e 's:CheckImmediateTransactionalDDL:_&:' \
+ -e 's:CheckTransactionalDDL:_&:' \
+ lib-python/3/sqlite3/test/transactions.py || die
+ sed -i -e 's:test_pha_optional:_&:' \
+ -e 's:test_pha_required:_&:' \
+ lib-python/3/test/test_ssl.py || die
+ sed -i -e 's:test_eval_bytes_invalid_escape:_&:' \
+ -e 's:test_eval_str_invalid_escape:_&:' \
+ lib-python/3/test/test_string_literals.py || die
+ # the first one's broken by sandbox, the second by our env
+ sed -i -e 's:test_empty_env:_&:' \
+ -e 's:test_executable:_&:' \
+ lib-python/3/test/test_subprocess.py || die
+ sed -i -e 's:test_jump_out_of_async_for_block:_&:' \
+ -e 's:test_jump_over_async_for_block_before_else:_&:' \
+ -e 's:test_no_jump_.*wards_into_async_for_block:_&:' \
+ -e 's:test_no_jump_into_async_for_block_before_else:_&:' \
+ -e 's:test_no_jump_from_yield:_&:' \
+ lib-python/3/test/test_sys_settrace.py || die
+ sed -i -e 's:test_circular_imports:_&:' \
+ lib-python/3/test/test_threaded_import.py || die
+
eapply_user
}
@@ -113,10 +169,11 @@ src_compile() {
src_test() {
# (unset)
local -x PYTHONDONTWRITEBYTECODE=
+ local -x COLUMNS=80
# Test runner requires Python 2 too. However, it spawns PyPy3
# internally so that we end up testing the correct interpreter.
- "${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die
+ "${EPYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die
}
src_install() {