BSD Ports

filesystems/py-pyfakefs 5.7.1_1 MidnightBSD

Implement a fake file system that mocks the Python file system modules

System
MidnightBSD
Repository
mports
Maintainer
[email protected]
License
Apache-2.0
Categories
filesystems, devel, python

Description

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.

In the other systems

The newest version among them is 6.2.0, as upstream numbers it.

SystemPortVersionVulnerabilitiesStatusMaintainerLast update
MidnightBSDfilesystems/py-pyfakefs5.7.1_1 behind since 2026-09-30no data-[email protected]-
FreeBSDfilesystems/py-pyfakefs6.2.0 newestnone known-[email protected]2026-09-30
DragonFlyfilesystems/py-pyfakefs5.8.0 behind since 2026-09-30none known-[email protected]-
HardenedBSDfilesystems/py-pyfakefs6.2.0 newestno data-[email protected]-
GhostBSDfilesystems/py-pyfakefs5.10.2 behind since 2026-09-30no data-[email protected]-

Install

Binary package:

mport install ${PYTHON_PKGNAMEPREFIX}pyfakefs

From mports:

cd /usr/mports/filesystems/py-pyfakefs && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pyfakefs>0:filesystems/py-pyfakefs

Dependency graph

Ports that need it on the left, what it needs to run on the right (to build, as it needs nothing to run); at most 8 of each. "Dependencies" below lists them all.

Dependencies

As this port's Makefile names them.

Build 2

Test 1

Build dependencies 2

No port depends on this one.

Configuration

No options to configure.

USES
python
Service scripts
none

Files

distinfo 1
FileSizeSHA256
pyfakefs-5.7.1.tar.gz21116324774c632f3b67ea26fd56b08115ba7c339d5cd65655410bca8572d73a1ae9a4
Master sites 1
  • PYPI