aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-03-31 03:05:06 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-03-31 03:05:06 +0000
commit9815657e797620996d1276790e3762e4833e9851 (patch)
treedc4929d4be2e0a04702ad4103eddab15d48a1fe7
parent11c886021e6de735b6cbf1f0c89271da11af7139 (diff)
downloadports-9815657e797620996d1276790e3762e4833e9851.tar.gz
ports-9815657e797620996d1276790e3762e4833e9851.zip
devel/py-pyfakefs: Add py-pyfakefs 5.3.5
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.
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-pyfakefs/Makefile24
-rw-r--r--devel/py-pyfakefs/distinfo3
-rw-r--r--devel/py-pyfakefs/pkg-descr13
4 files changed, 41 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index d7e485d6c5d5..e67c8ff1f605 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5350,6 +5350,7 @@
SUBDIR += py-pyee
SUBDIR += py-pyelftools
SUBDIR += py-pyface
+ SUBDIR += py-pyfakefs
SUBDIR += py-pyfcm
SUBDIR += py-pyflakes
SUBDIR += py-pyformance
diff --git a/devel/py-pyfakefs/Makefile b/devel/py-pyfakefs/Makefile
new file mode 100644
index 000000000000..15bb37b14aca
--- /dev/null
+++ b/devel/py-pyfakefs/Makefile
@@ -0,0 +1,24 @@
+PORTNAME= pyfakefs
+PORTVERSION= 5.3.5
+CATEGORIES= 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/devel/py-pyfakefs/distinfo b/devel/py-pyfakefs/distinfo
new file mode 100644
index 000000000000..d22cb346ed93
--- /dev/null
+++ b/devel/py-pyfakefs/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1710603292
+SHA256 (pyfakefs-5.3.5.tar.gz) = 7cdc500b35a214cb7a614e1940543acc6650e69a94ac76e30f33c9373bd9cf90
+SIZE (pyfakefs-5.3.5.tar.gz) = 196773
diff --git a/devel/py-pyfakefs/pkg-descr b/devel/py-pyfakefs/pkg-descr
new file mode 100644
index 000000000000..4e82fbb5cd45
--- /dev/null
+++ b/devel/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.