aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlater, Joseph <joe.slater@windriver.com>2020-07-31 09:40:01 -0700
committerKhem Raj <raj.khem@gmail.com>2020-08-06 10:26:29 -0700
commitbf8ebe03b9548ddf1eefc83df52f34681d28fbe2 (patch)
tree310738d654d69b1876f70eb6d17f73ac6b2d0411
parentcb2e90d004dd8d8e868de66c128451ca36c59f05 (diff)
downloadmeta-openembedded-bf8ebe03b9548ddf1eefc83df52f34681d28fbe2.tar.gz
python3-cryptography: fix two tests
Tests depending on the hypothesis module should be skipped if the module is not available. Signed-off-by: Joe Slater <joe.slater@windriver.com> Acked-by: Trevor Gamblin <trevor.gamblin@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-python/recipes-devtools/python/python3-cryptography/h-test.patch10
-rw-r--r--meta-python/recipes-devtools/python/python3-cryptography_2.8.bb1
2 files changed, 11 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-cryptography/h-test.patch b/meta-python/recipes-devtools/python/python3-cryptography/h-test.patch
new file mode 100644
index 0000000000..9f07c73803
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-cryptography/h-test.patch
@@ -0,0 +1,10 @@
+--- a/tests/hypothesis/__init__.py
++++ b/tests/hypothesis/__init__.py
+@@ -3,3 +3,7 @@
+ # for complete details.
+
+ from __future__ import absolute_import, division, print_function
++
++import pytest
++hypothesis = pytest.importorskip("hypothesis")
++
diff --git a/meta-python/recipes-devtools/python/python3-cryptography_2.8.bb b/meta-python/recipes-devtools/python/python3-cryptography_2.8.bb
index c75dabb974..95e903b290 100644
--- a/meta-python/recipes-devtools/python/python3-cryptography_2.8.bb
+++ b/meta-python/recipes-devtools/python/python3-cryptography_2.8.bb
@@ -11,6 +11,7 @@ SRC_URI[sha256sum] = "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02
SRC_URI += " \
file://run-ptest \
+ file://h-test.patch \
"
inherit pypi setuptools3