mock

Rolling backport of unittest.mock for all Pythons

40 个版本 Python >=3.6
Testing Cabal <testing-in-python@lists.idyll.org>
安装
pip install mock
poetry add mock
pipenv install mock
conda install mock
描述

mock is a library for testing in Python. It allows you to replace parts of your system under test with mock objects and make assertions about how they have been used.

mock is now part of the Python standard library, available as unittest.mock <https://docs.python.org/dev/library/unittest.mock.html>_ in Python 3.3 onwards.

This package contains a rolling backport of the standard library mock code compatible with Python 3.6 and up.

Please see the standard library documentation for more details.

:Homepage: Mock Homepage_ :Download: Mock on PyPI_ :Documentation: Python Docs_ :License: BSD License_ :Support: Mailing list (testing-in-python@lists.idyll.org) <http://lists.idyll.org/listinfo/testing-in-python>_ :Code: GitHub <https://github.com/testing-cabal/mock>_ :Issue tracker: GitHub Issues <https://github.com/testing-cabal/mock/issues>_ :Build status: |CircleCI|_ |Docs|_

.. |CircleCI| image:: https://circleci.com/gh/testing-cabal/mock/tree/master.svg?style=shield
.. _CircleCI: https://circleci.com/gh/testing-cabal/mock/tree/master

.. |Docs| image:: https://readthedocs.org/projects/mock/badge/?version=latest
.. _Docs: http://mock.readthedocs.org/en/latest/

.. _Mock Homepage: http://mock.readthedocs.org/en/latest/ .. _BSD License: https://github.com/testing-cabal/mock/blob/master/LICENSE.txt .. _Python Docs: https://docs.python.org/dev/library/unittest.mock.html .. _mock on PyPI: https://pypi.org/project/mock/

版本列表
5.2.0 2025-03-03
5.1.0 2023-07-11
5.0.2 2023-04-16
5.0.1 2023-01-09
5.0.0 2022-12-28
4.0.3 2020-12-10
4.0.2 2020-03-11
4.0.1 2020-02-06
4.0.0 2020-02-05
4.0.0b1 2020-01-29
3.0.5 2019-05-07
3.0.4 2019-05-04
3.0.3 2019-05-02
3.0.2 2019-05-02
3.0.1 2019-05-02
3.0.0 2019-05-02
2.0.0 2016-04-06
1.3.0 2015-07-23
1.2.0 2015-07-17
1.1.4 2015-07-17
1.1.3 2015-07-14
1.1.2 2015-07-10
1.1.1 2015-07-10
1.1.0 2015-07-10
1.0.1 2012-11-05
1.0.0 2012-10-07
1.0b1 2012-07-13
0.8.0 2012-02-13
0.7.2 2011-05-30
0.7.1 2011-05-10
0.7.0 2011-03-05
0.7.0rc1 2011-02-16
0.7.0b4 2010-11-12
0.7.0b3 2010-09-18
0.7.0b2 2010-06-23
0.7.0b1 2010-06-22
0.6.0 2009-08-22
0.5.0 2009-04-20
0.4.0 2008-10-12