Skip to main content
https://img.shields.io/pypi/v/backports.unittest_mock.svg https://img.shields.io/pypi/pyversions/backports.unittest_mock.svg https://img.shields.io/pypi/dm/backports.unittest_mock.svg https://img.shields.io/travis/jaraco/backports.unittest_mock/master.svg

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

backports.unittest_mock-1.2.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

backports.unittest_mock-1.2.1-py2.py3-none-any.whl (4.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file backports.unittest_mock-1.2.1.tar.gz.

File metadata

File hashes

Hashes for backports.unittest_mock-1.2.1.tar.gz
Algorithm Hash digest
SHA256 3a333a7a7641e4c7657c6086d117f88c61c96249b80dd7aa66eba0806a55a393
MD5 f7f129ad8734c5837f66fdd880938ec4
BLAKE2b-256 9ea3362e6fce04a695f10f70c9681b0bd49376995ec8d2364a002aa7a4d7b776

See more details on using hashes here.

File details

Details for the file backports.unittest_mock-1.2.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for backports.unittest_mock-1.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 524f2d12527c97cbd5a44008e834f08d69d1950363a25e098127cb04dd7412ee
MD5 763bac067d96f779f88ed6209a2ca526
BLAKE2b-256 05c320f7e1e99ec5c878e083424c7d94ed51e997b349e8adb47bbd790aae0a94

See more details on using hashes here.

Release history Release notifications | RSS feed

1.5.1

2 files

1.5

2 files

1.4

2 files

1.3

2 files

This release

1.2.1 This release

2 files

1.2

2 files

1.1.1

2 files

1.1

2 files

1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page