devel/py-pytest-socket: New port: Pytest Plugin to disable socket calls during tests

This commit is contained in:
Yuri Victorovich 2024-01-05 21:45:54 -08:00
parent 4fe45bf935
commit 98e9111bf6
4 changed files with 39 additions and 0 deletions

View file

@ -5416,6 +5416,7 @@
SUBDIR += py-pytest-runner
SUBDIR += py-pytest-services
SUBDIR += py-pytest-shutil
SUBDIR += py-pytest-socket
SUBDIR += py-pytest-subprocess
SUBDIR += py-pytest-subtests
SUBDIR += py-pytest-sugar

View file

@ -0,0 +1,33 @@
PORTNAME= pytest-socket
DISTVERSION= 0.6.0
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= ${PORTNAME:S/-/_/}-${PORTVERSION}
MAINTAINER= yuri@FreeBSD.org
COMMENT= Pytest Plugin to disable socket calls during tests
WWW= https://github.com/miketheman/pytest-socket
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>=1.0.0:devel/py-poetry-core@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=6.2.5:devel/py-pytest@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}asynctest>=0.13.0:devel/py-asynctest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}coverage>=7.0:devel/py-coverage@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}httpx>=0.23.0:www/py-httpx@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-httpbin>=1.0:devel/py-pytest-httpbin@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-randomly>=3.5.0:devel/py-pytest-randomly@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest>=7.0:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}requests>=2.26.0:www/py-requests@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}starlette>=0.23.0:www/py-starlette@${PY_FLAVOR}
USES= python
USE_PYTHON= pep517 autoplist pytest
NO_ARCH= yes
# tests are broken because they use the pytest-httpbin package that is broken with last werkzeug versions for a very long time
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1704478971
SHA256 (pytest_socket-0.6.0.tar.gz) = 363c1d67228315d4fc7912f1aabfd570de29d0e3db6217d61db5728adacd7138
SIZE (pytest_socket-0.6.0.tar.gz) = 12484

View file

@ -0,0 +1,2 @@
pytest-socket is a plugin to use with Pytest to disable or restrict socket calls
during tests to ensure network calls are prevented.