FreeBSD.software
Home/filesystems/py311-pyfakefs

py311-pyfakefs

5.10.2filesystems

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

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.

Origin
filesystems/py-pyfakefs
Size
5.04MiB
License
APACHE20
Maintainer
sunpoet@FreeBSD.org
Dependencies
1 packages
Required by
0 packages

Dependencies (1)