diff options
Diffstat (limited to 'filesystems/py-pyfakefs')
-rw-r--r-- | filesystems/py-pyfakefs/Makefile | 24 | ||||
-rw-r--r-- | filesystems/py-pyfakefs/distinfo | 3 | ||||
-rw-r--r-- | filesystems/py-pyfakefs/pkg-descr | 13 |
3 files changed, 40 insertions, 0 deletions
diff --git a/filesystems/py-pyfakefs/Makefile b/filesystems/py-pyfakefs/Makefile new file mode 100644 index 000000000000..5fd0516b932c --- /dev/null +++ b/filesystems/py-pyfakefs/Makefile @@ -0,0 +1,24 @@ +PORTNAME= pyfakefs +PORTVERSION= 5.7.1 +CATEGORIES= filesystems devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Implement a fake file system that mocks the Python file system modules +WWW= https://pytest-pyfakefs.readthedocs.io/en/stable/ \ + https://github.com/jmcgeheeiv/pyfakefs + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}undefined>=0:devel/py-undefined@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist concurrent pep517 pytest + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/filesystems/py-pyfakefs/distinfo b/filesystems/py-pyfakefs/distinfo new file mode 100644 index 000000000000..d76b6044cd26 --- /dev/null +++ b/filesystems/py-pyfakefs/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1729509154 +SHA256 (pyfakefs-5.7.1.tar.gz) = 24774c632f3b67ea26fd56b08115ba7c339d5cd65655410bca8572d73a1ae9a4 +SIZE (pyfakefs-5.7.1.tar.gz) = 211163 diff --git a/filesystems/py-pyfakefs/pkg-descr b/filesystems/py-pyfakefs/pkg-descr new file mode 100644 index 000000000000..4e82fbb5cd45 --- /dev/null +++ b/filesystems/py-pyfakefs/pkg-descr @@ -0,0 +1,13 @@ +pyfakefs implements a fake file system that mocks the Python file system +modules. Using pyfakefs, your tests operate on a fake file system in memory +without touching the real disk. The software under test requires no modification +to work with pyfakefs. + +Pyfakefs creates a new empty in-memory file system at each test start, which +replaces the real filesystem during the test. Think of pyfakefs as making a +per-test temporary directory, except for an entire file system. + +There are several means to achieve this: by using the fs fixture if running +pytest, by using fake_filesystem_unittest.TestCase as a base class if using +unittest, by using a fake_filesystem_unittest.Patcher instance as a context +manager, or by using the patchfs decorator. |