aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2023-06-24 01:02:44 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2023-06-24 02:54:08 +0000
commit1e03bffb9cf25614cae79b2ae0d60a8a8a47b1ea (patch)
tree35356d63dd269957a630789794f2c1f3d13aa1a0
parentecce5a22a377bffb098735519b60a094377e88c6 (diff)
devel/py-pytest-subprocess: New port: Pytest plugin to fake subprocess for pytest
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-pytest-subprocess/Makefile30
-rw-r--r--devel/py-pytest-subprocess/distinfo3
-rw-r--r--devel/py-pytest-subprocess/pkg-descr7
4 files changed, 41 insertions, 0 deletions
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.