Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jan 2024 08:06:44 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 98e9111bf64f - main - devel/py-pytest-socket: New port: Pytest Plugin to disable socket calls during tests
Message-ID:  <202401060806.40686idX021196@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=98e9111bf64f41fcebe07ca65db01a6254cdf7d3

commit 98e9111bf64f41fcebe07ca65db01a6254cdf7d3
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-01-06 05:45:54 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-01-06 08:06:38 +0000

    devel/py-pytest-socket: New port: Pytest Plugin to disable socket calls during tests
---
 devel/Makefile                   |  1 +
 devel/py-pytest-socket/Makefile  | 33 +++++++++++++++++++++++++++++++++
 devel/py-pytest-socket/distinfo  |  3 +++
 devel/py-pytest-socket/pkg-descr |  2 ++
 4 files changed, 39 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index e5d94b2e7385..a418cfa6042f 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -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
diff --git a/devel/py-pytest-socket/Makefile b/devel/py-pytest-socket/Makefile
new file mode 100644
index 000000000000..5291670aab72
--- /dev/null
+++ b/devel/py-pytest-socket/Makefile
@@ -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>
diff --git a/devel/py-pytest-socket/distinfo b/devel/py-pytest-socket/distinfo
new file mode 100644
index 000000000000..f6e4cd5b5f35
--- /dev/null
+++ b/devel/py-pytest-socket/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1704478971
+SHA256 (pytest_socket-0.6.0.tar.gz) = 363c1d67228315d4fc7912f1aabfd570de29d0e3db6217d61db5728adacd7138
+SIZE (pytest_socket-0.6.0.tar.gz) = 12484
diff --git a/devel/py-pytest-socket/pkg-descr b/devel/py-pytest-socket/pkg-descr
new file mode 100644
index 000000000000..e597870a2230
--- /dev/null
+++ b/devel/py-pytest-socket/pkg-descr
@@ -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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401060806.40686idX021196>