git: 34388df3fda0 - main - devel/py-pytest-recording: New port: Pytest Plugin that allows recording network interactions via VCR.py

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 10 Nov 2024 20:46:23 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=34388df3fda0e9439fc2bfca80763e82d627e622

commit 34388df3fda0e9439fc2bfca80763e82d627e622
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-11-10 20:45:45 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-11-10 20:46:19 +0000

    devel/py-pytest-recording: New port: Pytest Plugin that allows recording network interactions via VCR.py
---
 devel/Makefile                      |  1 +
 devel/py-pytest-recording/Makefile  | 27 +++++++++++++++++++++++++++
 devel/py-pytest-recording/distinfo  |  3 +++
 devel/py-pytest-recording/pkg-descr |  7 +++++++
 4 files changed, 38 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 5c18075e2dfc..8eabc936adaf 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5654,6 +5654,7 @@
     SUBDIR += py-pytest-random-order
     SUBDIR += py-pytest-randomly
     SUBDIR += py-pytest-recorder
+    SUBDIR += py-pytest-recording
     SUBDIR += py-pytest-regressions
     SUBDIR += py-pytest-regtest
     SUBDIR += py-pytest-relaxed
diff --git a/devel/py-pytest-recording/Makefile b/devel/py-pytest-recording/Makefile
new file mode 100644
index 000000000000..035666ad7019
--- /dev/null
+++ b/devel/py-pytest-recording/Makefile
@@ -0,0 +1,27 @@
+PORTNAME=	pytest-recording
+DISTVERSION=	0.13.2
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTNAME=	${PORTNAME:S/-/_/}-${PORTVERSION}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Pytest Plugin that allows recording network interactions via VCR.py
+WWW=		https://github.com/kiwicom/pytest-recording
+
+LICENSE=	MIT
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}vcrpy>=2.0.1:devel/py-vcrpy@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	pep517 autoplist pytest
+
+TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+NO_ARCH=	yes
+
+# tests as of 0.13.2: 30 failed, 29 passed, 6 skipped in 42.49s, see https://github.com/kiwicom/pytest-recording/issues/154
+
+.include <bsd.port.mk>
diff --git a/devel/py-pytest-recording/distinfo b/devel/py-pytest-recording/distinfo
new file mode 100644
index 000000000000..a3d402e432dd
--- /dev/null
+++ b/devel/py-pytest-recording/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1731270780
+SHA256 (pytest_recording-0.13.2.tar.gz) = 000c3babbb466681457fd65b723427c1779a0c6c17d9e381c3142a701e124877
+SIZE (pytest_recording-0.13.2.tar.gz) = 25270
diff --git a/devel/py-pytest-recording/pkg-descr b/devel/py-pytest-recording/pkg-descr
new file mode 100644
index 000000000000..e5cdf53399f0
--- /dev/null
+++ b/devel/py-pytest-recording/pkg-descr
@@ -0,0 +1,7 @@
+Pytest plugin that allows recording network interactions via VCR.py
+
+Features:
+* Straightforward pytest.mark.vcr, that reflects VCR.use_cassettes API
+* Combining multiple VCR cassettes
+* Network access blocking
+* The rewrite recording mode that rewrites cassettes from scratch