Contents

pytest-mock 3.14.0

0

Thin-wrapper around the mock package for easier use with pytest

Thin-wrapper around the mock package for easier use with pytest

Stars: 1846, Watchers: 1846, Forks: 143, Open Issues: 11

The pytest-dev/pytest-mock repo was created 10 years ago and the last code push was 4 days ago.
The project is very popular with an impressive 1846 github stars!

How to Install pytest-mock

You can install pytest-mock using pip

pip install pytest-mock

or add it to a project with poetry

poetry add pytest-mock

Package Details

Author
None
License
MIT
Homepage
None
PyPi:
https://pypi.org/project/pytest-mock/
Documentation:
https://pytest-mock.readthedocs.io/en/latest/
GitHub Repo:
https://github.com/pytest-dev/pytest-mock

Classifiers

  • Software Development/Testing
No  pytest-mock  pypi packages just yet.

Errors

A list of common pytest-mock errors.

Code Examples

Here are some pytest-mock code examples and snippets.

GitHub Issues

The pytest-mock package has 11 open issues on GitHub

  • Tests fail with pytest-asyncio 0.17 due to asyncio-mode legacy warning
  • Patching via a fixture does not seem to reset when using return_value

See more issues on GitHub

Related Packages & Articles

pytest-xdist 3.6.1

pytest xdist plugin for distributed testing, most importantly across multiple CPUs

pytest-socket 0.7.0

A plugin to use with Pytest to disable or restrict socket calls during tests to ensure network calls are prevented.