[meta-python,1/1] python3-cryptography: fix two tests

Submitted by Slater, Joseph on July 31, 2020, 4:40 p.m. | Patch ID: 174965

Details

Message ID 20200731164001.16113-1-joe.slater@windriver.com
State Accepted
Commit bf8ebe03b9548ddf1eefc83df52f34681d28fbe2
Headers show

Commit Message

Slater, Joseph July 31, 2020, 4:40 p.m.
Tests depending on the hypothesis module should be skipped
if the module is not available.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
---
 .../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

Patch hide | download patch | download mbox

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 0000000..9f07c73
--- /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 c75dabb..95e903b 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

Comments

Trevor Gamblin Aug. 6, 2020, 12:57 p.m.
On 7/31/20 12:40 PM, Joe Slater wrote:
> 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>
> ---
>   .../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
>
> 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 0000000..9f07c73
> --- /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 c75dabb..95e903b 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
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#86168): https://lists.openembedded.org/g/openembedded-devel/message/86168
Mute This Topic: https://lists.openembedded.org/mt/75910995/3617530
Group Owner: openembedded-devel+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-