1 |
commit: e8b710c52af507e0e93b850f9a565d4bfffde12f |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 28 09:57:21 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 28 11:00:57 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8b710c5 |
7 |
|
8 |
dev-python/pip: Backport test changes to 21.3.1 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pip/pip-21.3.1.ebuild | 16 +++++++++++++--- |
13 |
1 file changed, 13 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/dev-python/pip/pip-21.3.1.ebuild b/dev-python/pip/pip-21.3.1.ebuild |
16 |
index 66022d354643..63a8c874c7eb 100644 |
17 |
--- a/dev-python/pip/pip-21.3.1.ebuild |
18 |
+++ b/dev-python/pip/pip-21.3.1.ebuild |
19 |
@@ -56,6 +56,7 @@ BDEPEND=" |
20 |
python_prepare_all() { |
21 |
local PATCHES=( |
22 |
"${FILESDIR}/${PN}-21.3-no-coverage.patch" |
23 |
+ "${FILESDIR}/${P}-cryptography-tests.patch" |
24 |
) |
25 |
if ! use vanilla; then |
26 |
PATCHES+=( "${FILESDIR}/pip-20.0.2-disable-system-install.patch" ) |
27 |
@@ -76,7 +77,7 @@ python_test() { |
28 |
return 0 |
29 |
fi |
30 |
|
31 |
- local deselect=( |
32 |
+ local EPYTEST_DESELECT=( |
33 |
tests/functional/test_install.py::test_double_install_fail |
34 |
tests/functional/test_list.py::test_multiple_exclude_and_normalization |
35 |
'tests/unit/test_commands.py::test_index_group_handle_pip_version_check[False-False-True-download]' |
36 |
@@ -96,12 +97,21 @@ python_test() { |
37 |
tests/functional/test_pep660.py |
38 |
) |
39 |
|
40 |
- [[ ${EPYTHON} == python3.10 ]] && deselect+=( |
41 |
+ [[ ${EPYTHON} == python3.10 ]] && EPYTEST_DESELECT+=( |
42 |
tests/lib/test_lib.py::test_correct_pip_version |
43 |
# uses vendored packaging that uses deprecated distutils |
44 |
tests/functional/test_warning.py::test_pip_works_with_warnings_as_errors |
45 |
) |
46 |
|
47 |
+ if ! has_version "dev-python/cryptography[${PYTHON_USEDEP}]"; then |
48 |
+ EPYTEST_DESELECT+=( |
49 |
+ tests/functional/test_install.py::test_install_sends_client_cert |
50 |
+ tests/functional/test_install_config.py::test_do_not_prompt_for_authentication |
51 |
+ tests/functional/test_install_config.py::test_prompt_for_authentication |
52 |
+ tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed |
53 |
+ ) |
54 |
+ fi |
55 |
+ |
56 |
distutils_install_for_testing |
57 |
pushd "${WORKDIR}/virtualenv-${VENV_PV}" >/dev/null || die |
58 |
distutils_install_for_testing |
59 |
@@ -110,7 +120,7 @@ python_test() { |
60 |
local -x GENTOO_PIP_TESTING=1 \ |
61 |
PATH="${TEST_DIR}/scripts:${PATH}" \ |
62 |
PYTHONPATH="${TEST_DIR}/lib:${BUILD_DIR}/lib" |
63 |
- epytest ${deselect[@]/#/--deselect } -m "not network" |
64 |
+ epytest -m "not network" |
65 |
} |
66 |
|
67 |
python_install_all() { |