{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/2"},{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/4"},{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing"},{"label":"Filesystems","url":"https://skillfed.io/packages/category/system-filesystems"}],"enrichment":{"capability":"pyfakefs mocks the Python file system modules to run tests against an in-memory fake filesystem instead of the real disk, with no changes required to the code under test.","skillfed_tags":["test-isolation","mocking","filesystem"],"use_cases":["Test file I/O code (reading, writing, deleting) without creating temporary files on disk","Verify error handling for missing files or permission issues in a controlled environment","Run filesystem-heavy test suites in parallel without disk contention or cleanup overhead","Test cross-platform file path logic (Windows vs. POSIX) on a single machine","Simulate full filesystem scenarios (large directory trees, disk full conditions) cheaply in memory"],"what_it_does":"pyfakefs is a testing library that replaces the real filesystem with an in-memory fake one during test execution. It automatically mocks Python's file system modules so your tests can create, read, and manipulate files without touching disk. Each test gets a fresh empty filesystem, making tests isolated and fast. The library works with unittest (via TestCase subclass or Patcher context manager) and as a decorator on individual tests.\n\nThe package handles cross-platform testing by emulating Linux, Windows, and macOS filesystems, and includes features like mapping real files into the fake filesystem, tracking filesystem size, pausing/resuming patching, and simulating non-root user behavior. It does not work with libraries that use C-level filesystem access, since pyfakefs cannot patch underlying C library calls.","worth_installing":"Yes. pyfakefs is production-stable (Development Status 5), actively maintained, has no security vulnerabilities, and zero runtime dependencies. It solves a real testing problem\u2014isolating filesystem operations\u2014and is widely used. Install it if your test suite touches the filesystem."},"id":"pyfakefs","links":{"html":"https://skillfed.io/packages/pyfakefs","md":"https://skillfed.io/packages/pyfakefs.md","pypi":"https://pypi.org/project/pyfakefs/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-04-12","license_spdx":"Apache-2.0","license_treatment":"permissive","name":"pyfakefs","python_support":"supports_current","summary":"Implements a fake file system that mocks the Python file system modules."},"popularity":{"monthly_downloads":4466529,"position":2298,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"6.2.0"}
