commit:     0cf8cd82a63f045cf695be8e0494527ed27c27fd
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 27 13:29:16 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov 27 13:46:21 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cf8cd82

dev-python/werkzeug: Support testing without cryptography

Skip tests requiring cryptography when it is unavailable.  This prepares
werkzeug-2 for removal of keywords due to Rust.

werkzeug-1 is fine since it skips tests requiring cryptography
gracefully.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/werkzeug/werkzeug-2.0.2.ebuild | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dev-python/werkzeug/werkzeug-2.0.2.ebuild 
b/dev-python/werkzeug/werkzeug-2.0.2.ebuild
index ce9f8fe88f1a..6d3f35c97c9e 100644
--- a/dev-python/werkzeug/werkzeug-2.0.2.ebuild
+++ b/dev-python/werkzeug/werkzeug-2.0.2.ebuild
@@ -35,6 +35,15 @@ BDEPEND="
 distutils_enable_tests pytest
 
 python_test() {
+       local EPYTEST_DESELECT=()
+       if ! has_version "dev-python/cryptography[${PYTHON_USEDEP}]"; then
+               EPYTEST_DESELECT+=(
+                       "tests/test_serving.py::test_server[https]"
+                       tests/test_serving.py::test_ssl_dev_cert
+                       tests/test_serving.py::test_ssl_object
+               )
+       fi
+
        distutils_install_for_testing --via-venv
 
        # the default portage tempdir is too long for AF_UNIX sockets

Reply via email to