commit: 6bffdf777597695bb49a758869ac20d27baab879
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 27 10:11:31 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov 27 10:27:29 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6bffdf77
dev-python/requests-toolbelt: Support testing without pyopenssl
Support ignoring the tests requiring pyopenssl + cryptography
if the packages are not installed. This is in preparation to them
losing keywords due to use of Rust.
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/requests-toolbelt/requests-toolbelt-0.9.1.ebuild | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dev-python/requests-toolbelt/requests-toolbelt-0.9.1.ebuild
b/dev-python/requests-toolbelt/requests-toolbelt-0.9.1.ebuild
index 145581a7c94d..c6bf76f2db87 100644
--- a/dev-python/requests-toolbelt/requests-toolbelt-0.9.1.ebuild
+++ b/dev-python/requests-toolbelt/requests-toolbelt-0.9.1.ebuild
@@ -19,6 +19,7 @@ RDEPEND="<dev-python/requests-3.0.0[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
test? (
dev-python/betamax[${PYTHON_USEDEP}]
+ dev-python/cryptography[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/pyopenssl[${PYTHON_USEDEP}]
)"
@@ -42,5 +43,14 @@ python_test() {
tests/test_multipart_encoder.py::TestMultipartEncoder::test_reads_file_from_url_wrapper
)
+ local EPYTEST_IGNORE=()
+ if ! has_version "dev-python/cryptography[${PYTHON_USEDEP}]" ||
+ ! has_version "dev-python/pyopenssl[${PYTHON_USEDEP}]"
+ then
+ EPYTEST_IGNORE+=(
+ tests/test_x509_adapter.py
+ )
+ fi
+
epytest
}