git: 04ffc1149dcf - main - security/py-vici: fix tests

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Wed, 27 Apr 2022 11:42:29 UTC
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=04ffc1149dcfe2812d5c0a511d556325cafda9fa

commit 04ffc1149dcfe2812d5c0a511d556325cafda9fa
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2022-04-26 16:05:11 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-04-27 11:42:14 +0000

    security/py-vici: fix tests
    
    Switch to USES=pytest, fix test depends and run pytest directly
    instead of through tox, which hinders testing by trying to use
    unrelated interpreters and install dependencies with pip.
    
    Reported by:    reprise
    Approved by:    portmgr blanket
---
 security/py-vici/Makefile | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/security/py-vici/Makefile b/security/py-vici/Makefile
index 65821173ea99..1bf36c03c0ab 100644
--- a/security/py-vici/Makefile
+++ b/security/py-vici/Makefile
@@ -10,16 +10,12 @@ COMMENT=	Native Python interface for strongSwan's VICI protocol
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pycodestyle>0:devel/py-pycodestyle@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}tox>0:devel/py-tox@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest-pycodestyle>0:devel/py-pytest-pycodestyle@${PY_FLAVOR}
 
-USES=		python:3.6+
+USES=		python:3.6+ pytest
 USE_PYTHON=	autoplist concurrent distutils
+PYTEST_ARGS=	--pycodestyle
 
 NO_ARCH=	yes
 
-do-test: # skip non installed python versions in the tests (because flavors)
-	cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m tox --skip-missing-interpreters
-
 .include <bsd.port.mk>