BSD Ports

filesystems/py-pyfakefs 5.8.0 DragonFly

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

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
APACHE20
Categories
devel, filesystems, python
Package size
494.6 KiB, 5044.8 KiB installed

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
DragonFlyfilesystems/py-pyfakefs5.8.0 behind since 2026-09-30none known-[email protected]-
FreeBSDfilesystems/py-pyfakefs6.2.0 newestnone known-[email protected]2026-09-30
MidnightBSDfilesystems/py-pyfakefs5.7.1_1 behind since 2026-09-30no data-[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:

pkg install py311-pyfakefs

From DPorts:

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

Dependency graph

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

Dependencies

Run dependencies 1

No port depends on this one.