CodeBrowser / python-package / pytest-mock
pytest-mock==3.15.1
# Thin-wrapper around the mock package for easier use with pytest
$ pip install pytest-mock
downloads/wk
22,882,410
license
MIT
version
3.15.1
python
>=3.9
What is pytest-mock?
pytest-mock is a pytest plugin that provides a simpler interface to Python's mock library, reducing boilerplate and making mocking more convenient in test code. Developers use it to stub out dependencies and verify function calls during testing without having to manually manage mock object lifecycles. It integrates directly with pytest's fixture system, so mocks are automatically cleaned up after each test.
Keywords
#pytest #mock
Dependencies (4)