1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00

devel/py-pytest-subprocess: New port: Pytest plugin to fake subprocess for pytest

This commit is contained in:
Yuri Victorovich 2023-06-23 18:02:44 -07:00
parent ecce5a22a3
commit 1e03bffb9c
4 changed files with 41 additions and 0 deletions

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -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.