Provides a function “install()” which makes the “mock” module available as “unittest.mock” on Python 3.2 and earlier.
Also advertises a pytest plugin which configures unittest.mock automatically.
License
License is indicated in the project metadata (typically one or more of the Trove classifiers). For more details, see this explanation.
Docs
There’s no good mechanism for publishing documentation easily. If there’s a documentation link above, it’s probably stale because PyPI-based documentation is deprecated. This project may have documentation published at ReadTheDocs, but probably not. Good luck finding it.
Usage
If using pytest, simply require this package in your test environment, and unittest.mock will be available.
Otherwise, it must be invoked imperatively:
import backports.unittest_mock backports.unittest_mock.install() import unittest.mock
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file backports.unittest_mock-1.2.1.tar.gz.
File metadata
- Download URL: backports.unittest_mock-1.2.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a333a7a7641e4c7657c6086d117f88c61c96249b80dd7aa66eba0806a55a393
|
|
| MD5 |
f7f129ad8734c5837f66fdd880938ec4
|
|
| BLAKE2b-256 |
9ea3362e6fce04a695f10f70c9681b0bd49376995ec8d2364a002aa7a4d7b776
|
File details
Details for the file backports.unittest_mock-1.2.1-py2.py3-none-any.whl.
File metadata
- Download URL: backports.unittest_mock-1.2.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
524f2d12527c97cbd5a44008e834f08d69d1950363a25e098127cb04dd7412ee
|
|
| MD5 |
763bac067d96f779f88ed6209a2ca526
|
|
| BLAKE2b-256 |
05c320f7e1e99ec5c878e083424c7d94ed51e997b349e8adb47bbd790aae0a94
|