git: 748bf94cf0d5 - main - security/py-paramiko: switch to USES=pytest and fix tests
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Apr 2022 11:42:31 UTC
The branch main has been updated by amdmi3:
URL: https://cgit.FreeBSD.org/ports/commit/?id=748bf94cf0d5bf0014454444569ca218d38765ad
commit 748bf94cf0d5bf0014454444569ca218d38765ad
Author: Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2022-04-26 17:19:06 +0000
Commit: Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-04-27 11:42:14 +0000
security/py-paramiko: switch to USES=pytest and fix tests
- Note that tests must be run with pytest, as some of them use
pytest decorators which do not work with unittest.
- PYTEST_ARGS were taken from upstream pytest.ini which is missing
from pypi distribution. Without these, test collection hangs.
- In theory, it can be switched from pytest4 to recent pytest: as
pytest.ini says, pytest-relaxed which is not compatible with
pytest7 as a plugin, is not used as such. But it would require
creating a copy of py-pytest-relaxed port to get rid of conflicting
pytest4 dependency, so let's stay with pytest4 for now.
Reported by: reprise
Approved by: portmgr blanket
---
security/py-paramiko/Makefile | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/security/py-paramiko/Makefile b/security/py-paramiko/Makefile
index d8aada322fbb..e86d3fba6c70 100644
--- a/security/py-paramiko/Makefile
+++ b/security/py-paramiko/Makefile
@@ -16,15 +16,14 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bcrypt>=3.1.3:security/py-bcrypt@${PY_FLAVOR
${PYTHON_PKGNAMEPREFIX}cryptography>=2.5:security/py-cryptography@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyasn1>=0.1.7:devel/py-pyasn1@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pynacl>=1.0.1:security/py-pynacl@${PY_FLAVOR}
-TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}mock>=0:devel/py-mock@${PY_FLAVOR}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mock>=0:devel/py-mock@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-relaxed>=0:devel/py-pytest-relaxed@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}invoke>=0:devel/py-invoke@${PY_FLAVOR}
-USES= cpe python:3.6+
+USES= cpe python:3.6+ pytest:4
USE_PYTHON= autoplist distutils
+PYTEST_ARGS= -p no:relaxed
NO_ARCH= yes
-do-test:
- @(cd ${WRKSRC} && ${PYTHON_CMD} -m unittest discover .)
-
.include <bsd.port.mk>