diff options
author | Kubilay Kocak <koobs@FreeBSD.org> | 2019-03-25 07:30:26 +0000 |
---|---|---|
committer | Kubilay Kocak <koobs@FreeBSD.org> | 2019-03-25 07:30:26 +0000 |
commit | 60097679d79442ff5fc079974154c6740f4143af (patch) | |
tree | 21b4c3adbc536b0cf353c68345f116cdd391a558 | |
parent | 6791bf473755391696de5ac4d5aaf9a89072d01d (diff) | |
download | ports-60097679d79442ff5fc079974154c6740f4143af.tar.gz ports-60097679d79442ff5fc079974154c6740f4143af.zip |
MFH: r489245 security/py-keyrings.alt: Add test support to assist committer QA
Add TEST_DEPENDS and (do-)test target to help QA of an upcoming devel/py-fs
update [1].
The tests currently pass: 128 passed, 61 skipped in 21.56 seconds
While I'm here:
- Pet portlint (extra item placed in the USES/USE_x section)
PR: 234491
Approved by: portmgr (framework/infrastructure support/compliance)
Approved by: ports-secteam (miwi)
Notes
Notes:
svn path=/branches/2019Q1/; revision=496796
-rw-r--r-- | security/py-keyrings.alt/Makefile | 11 | ||||
-rw-r--r-- | security/py-keyrings.alt/files/patch-tests_test__crypto.py | 13 | ||||
-rw-r--r-- | security/py-keyrings.alt/files/patch-tests_test__file.py | 15 |
3 files changed, 38 insertions, 1 deletions
diff --git a/security/py-keyrings.alt/Makefile b/security/py-keyrings.alt/Makefile index 769b31b5ad6e..e020e012ef4a 100644 --- a/security/py-keyrings.alt/Makefile +++ b/security/py-keyrings.alt/Makefile @@ -15,11 +15,17 @@ LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=1.15.0:devel/py-setuptools_scm@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=2.8:devel/py-pytest@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}keyring>=10.3.1:security/py-keyring@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pycrypto>0:security/py-pycrypto@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}fs>=0.5:devel/py-fs@${PY_FLAVOR} -NO_ARCH= yes USES= python USE_PYTHON= autoplist distutils +NO_ARCH= yes + OPTIONS_DEFINE= ENCRYPTED_FILE GNOME_KEYRING KEYCZAR PYFS ENCRYPTED_FILE_DESC= Install pycrypto to support the Encrypted File backend GNOME_KEYRING_DESC= Install GNOME Keyring to support the Gnome backend @@ -31,4 +37,7 @@ GNOME_KEYRING_USE= GNOME=pygobject3 KEYCZAR_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}keyczar>=0.71c:security/py-keyczar@${PY_FLAVOR} PYFS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}fs>=0.5:devel/py-fs@${PY_FLAVOR} +do-test: + @cd ${WRKSRC} && ${PYTHON_CMD} -m pytest + .include <bsd.port.mk> diff --git a/security/py-keyrings.alt/files/patch-tests_test__crypto.py b/security/py-keyrings.alt/files/patch-tests_test__crypto.py new file mode 100644 index 000000000000..c990d71647b7 --- /dev/null +++ b/security/py-keyrings.alt/files/patch-tests_test__crypto.py @@ -0,0 +1,13 @@ +# mock dependency set in TEST_DEPENDS is actually backports.unittest_mock +# but this package doesn't exist in the ports tree yet, so adjust the import +# here to import 'mock' proper. TODO + +--- tests/test_crypto.py.orig 2019-01-04 05:26:47 UTC ++++ tests/test_crypto.py +@@ -1,5 +1,5 @@ + import unittest +-from unittest import mock ++import mock + + from .test_file import FileKeyringTests + diff --git a/security/py-keyrings.alt/files/patch-tests_test__file.py b/security/py-keyrings.alt/files/patch-tests_test__file.py new file mode 100644 index 000000000000..01a402ea0cd0 --- /dev/null +++ b/security/py-keyrings.alt/files/patch-tests_test__file.py @@ -0,0 +1,15 @@ +# mock dependency set in TEST_DEPENDS is actually backports.unittest_mock +# but this package doesn't exist in the ports tree yet, so adjust the import +# here to import 'mock' proper. TODO + +--- tests/test_file.py.orig 2019-01-04 05:24:38 UTC ++++ tests/test_file.py +@@ -7,7 +7,7 @@ import unittest + from six.moves import configparser + + import pytest +-from unittest import mock ++import mock + + from keyring.tests.test_backend import BackendBasicTests + from keyring.tests.util import random_string |