Mock (unittest.mock backport)

JSON →
library 5.2.0 ·python
verified Jun 9, 2026 install

The `mock` library is the official backport of the `unittest.mock` module, providing powerful tools for testing in Python. It enables developers to replace parts of their system under test with mock objects, allowing for isolated and predictable testing without relying on actual implementations or external dependencies. While `unittest.mock` has been part of Python's standard library since version 3.3, the `mock` package on PyPI historically provided these functionalities for older Python versions and sometimes offered newer features or bug fixes that were later integrated into the standard library. The current version is 5.2.0, with ongoing maintenance.

total hits 11
actors 3 distinct systems
last hit 16d ago AhrefsBot
MetaBot
4
Script
2
Humans
2

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇨🇦 Canada · 🇬🇧 United Kingdom · PY