testing-cabal/mock

The Python mock library

Python

537

1,115 commits

updated Mar 3, 2025

See the code

README

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/

Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.

testing-cabal/mock

The Python mock library

Python

537

1,115 commits

updated Mar 3, 2025

See the code

README

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/

Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.

Significant stargazers

Carson Ip

70 followers · starred Jul 2018

tcely

25 followers · starred Mar 2025

Amit Saha

187 followers · starred Mar 2016

Maks Skorokhod

34 followers · starred Jan 2018