dev-python/jedi: Port to py3.10

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2021-06-30 14:10:15 +02:00
parent 6e1f809fe0
commit bc48731e6e

View File

@@ -3,7 +3,7 @@
EAPI=7
PYTHON_COMPAT=( python3_{7..9} )
PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
@@ -46,25 +46,24 @@ python_prepare_all() {
# test_complete_expanduser relies on $HOME not being empty
> "${HOME}"/somefile || die
# TODO: investigate
sed -e 's:test_local_import:_&:' \
-i test/test_utils.py || die
sed -e '/with sqlite3\.connect/,+2d' \
-i test/completion/stdlib.py || die
rm test/completion/django.py || die
# these tests fail with various pytest<->python version combinations
rm test/completion/pytest.py || die
# tests relying on pristine virtualenv
# this relies on test* not matching anything else
sed -e "/#\? \['test'\]/,+1d" \
-i test/completion/on_import.py || die
# this one's broken by 'path' module (dev-python/path-py)
sed -e 's:test_os_issues:_&:' \
-i test/test_inference/test_imports.py || die
sed -e 's:test_venv_and_pths:_&:' \
-i test/test_inference/test_sys_path.py || die
distutils-r1_python_prepare_all
}
python_test() {
local deselect=(
# TODO
'test/test_integration.py::test_completion[stdlib:155]'
'test/test_integration.py::test_completion[on_import:29]'
# assume pristine virtualenv
test/test_utils.py::TestSetupReadline::test_local_import
test/test_inference/test_imports.py::test_os_issues
)
[[ ${EPYTHON} == python3.10 ]] && deselect+=(
# new features increased the match count again
test/test_utils.py::TestSetupReadline::test_import
)
# django and pytest tests are very version dependent
epytest ${deselect[@]/#/--deselect } -k "not django and not pytest"
}