Skip to contentSkip to conversation

python3-cryptography: fix two tests

PATCH In review Joe Slater 2 participants 2 messages Jul 31, 2020 – Aug 6, 2020

lore
Share & tools
lore

Joe Slater

author
#0 lore raw

PATCH 1/1 python3-cryptography: fix two tests

Tests depending on the hypothesis module should be skipped if the module is not available.

---
 .../recipes-devtools/python/python3-cryptography/h-test.patch  | 10 ++++++++++
 .../recipes-devtools/python/python3-cryptography_2.8.bb        |  1 +
 2 files changed, 11 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-cryptography/h-test.patch
meta-python/recipes-devtools/python/python3-cryptography/h-test.patch new file +10 -0
new file mode 100644
index 0000000..9f07c73
@@ -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")
++
meta-python/recipes-devtools/python/python3-cryptography_2.8.bb +1 -0
index c75dabb..95e903b 100644
@@ -11,6 +11,7 @@ SRC_URI[sha256sum] = "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02
 
 SRC_URI += " \
     file://run-ptest \
+    file://h-test.patch \
 "
 
 inherit pypi setuptools3
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Joe Slater

Tests depending on the hypothesis module should be skipped if the module is not available.

Quoted 36 lines
---
  .../recipes-devtools/python/python3-cryptography/h-test.patch  | 10 ++++++++++
  .../recipes-devtools/python/python3-cryptography_2.8.bb        |  1 +
  2 files changed, 11 insertions(+)

create mode 100644 meta-python/recipes-devtools/python/python3-cryptography/h-test.patch

meta-python/recipes-devtools/python/python3-cryptography/h-test.patch new file +10 -0
new file mode 100644
index 0000000..9f07c73
@@ -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")
++
meta-python/recipes-devtools/python/python3-cryptography_2.8.bb +1 -0
index c75dabb..95e903b 100644
@@ -11,6 +11,7 @@ SRC_URI[sha256sum] = "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02
 
  SRC_URI += " \
      file://run-ptest \
+    file://h-test.patch \
  "
 
  inherit pypi setuptools3