git: 1e03bffb9cf2 - main - devel/py-pytest-subprocess: New port: Pytest plugin to fake subprocess for pytest

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 24 Jun 2023 02:54:12 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1e03bffb9cf25614cae79b2ae0d60a8a8a47b1ea

commit 1e03bffb9cf25614cae79b2ae0d60a8a8a47b1ea
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-06-24 01:02:44 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-06-24 02:54:08 +0000

    devel/py-pytest-subprocess: New port: Pytest plugin to fake subprocess for pytest
---
 devel/Makefile                       |  1 +
 devel/py-pytest-subprocess/Makefile  | 30 ++++++++++++++++++++++++++++++
 devel/py-pytest-subprocess/distinfo  |  3 +++
 devel/py-pytest-subprocess/pkg-descr |  7 +++++++
 4 files changed, 41 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 9d35cae07da4..3968e644239f 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5345,6 +5345,7 @@
     SUBDIR += py-pytest-runner
     SUBDIR += py-pytest-services
     SUBDIR += py-pytest-shutil
+    SUBDIR += py-pytest-subprocess
     SUBDIR += py-pytest-subtests
     SUBDIR += py-pytest-sugar
     SUBDIR += py-pytest-timeout
diff --git a/devel/py-pytest-subprocess/Makefile b/devel/py-pytest-subprocess/Makefile
new file mode 100644
index 000000000000..fe402f99019f
--- /dev/null
+++ b/devel/py-pytest-subprocess/Makefile
@@ -0,0 +1,30 @@
+PORTNAME=	pytest-subprocess
+DISTVERSION=	1.5.0
+CATEGORIES=	devel python
+#MASTER_SITES=	PYPI # no tests
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Pytest plugin to fake subprocess for pytest
+WWW=		https://github.com/aklajnert/pytest-subprocess
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>=4.0.0:devel/py-pytest@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}anyio>=0:devel/py-anyio@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}coverage>=0:devel/py-coverage@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}docutils>=0.12:textproc/py-docutils@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pygments>=2.0:textproc/py-pygments@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pytest-asyncio>=0.15.1:devel/py-pytest-asyncio@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pytest-rerunfailures>=0:devel/py-pytest-rerunfailures@${PY_FLAVOR}
+
+USES=		python:3.6+
+USE_PYTHON=	distutils autoplist pytest # 2 tests fail, see https://github.com/aklajnert/pytest-subprocess/issues/123
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	aklajnert
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-pytest-subprocess/distinfo b/devel/py-pytest-subprocess/distinfo
new file mode 100644
index 000000000000..ed51b2147fe9
--- /dev/null
+++ b/devel/py-pytest-subprocess/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1687554684
+SHA256 (aklajnert-pytest-subprocess-1.5.0_GH0.tar.gz) = 80172ac95439cd4a237c5ee7f343227a7fd21fb61284bfa0de4b7802502d88dc
+SIZE (aklajnert-pytest-subprocess-1.5.0_GH0.tar.gz) = 34771
diff --git a/devel/py-pytest-subprocess/pkg-descr b/devel/py-pytest-subprocess/pkg-descr
new file mode 100644
index 000000000000..822bfe917a9a
--- /dev/null
+++ b/devel/py-pytest-subprocess/pkg-descr
@@ -0,0 +1,7 @@
+pytest-subprocess is a pytest plugin to fake subprocess.
+
+The plugin adds the fake_process fixture (and fp as an alias). It can be used
+it to register subprocess results so you won't need to rely on the real
+processes. The plugin hooks on the subprocess.Popen(), which is the base for
+other subprocess functions. That makes the subprocess.run(), subprocess.call(),
+subprocess.check_call() and subprocess.check_output() methods also functional.